My application file (EAR) consists of combination of EJB and WAR. FrameWork is JSF and IDE is Netbeans 6.9.1 applition server is glassfich V2.x. I want to calculate the execution time fro each and every invoked method in my application. i have gone through so many blogs. most of them suggested to use AOP. but nobody tell me how to configure and how to use it in my application. could anybody tell me ragarding this. If you any additional details to answer this i will provide.
My application file (EAR) consists of combination of EJB and WAR. FrameWork is JSF
Share
If you’re trying to do AOP in Java, you’re probably looking for AspectJ. ( http://eclipse.org/aspectj/ ) It’s complex, but will do exactly what you’re asking, and there are many books on the subject. (I recommend you read one – it truly is that complicated)
Alternatively, if your application is using Weld/CDI, you can use an alternative which is quite a bit simpler called Interceptors: http://docs.jboss.org/weld/reference/1.0.0/en-US/html/interceptors.html
I’d stop short of recommending you use weld to get Interceptor support, but that’s probably quicker than learning AspectJ from scratch.