Mar 3rd, 2013, 02:25 AM
Profile Spring methods using annotation
I want to performance monitor & profile the respective methods in Spring Services through annotation. I am using Spring 2.5 and not 3.1 which supports @profile.Similar to that behavior I need to for Spring 2.5. Where I can explicitly specify @profile for the respective methods to be profiled with spring aspectj. Any examples are highly appreciated.
1) Can we profile a private methods
2) Final methods
3) If we profile service whether we need to profile the DAO as well?
Mar 4th, 2013, 04:56 AM
@Profile has nothing to do with profiling (I suggest a read of the reference guide what it does).
You can do whatever you want it depends on how you want to do it. If you want to use proxy based AOP (spring default) then 1 and 2 are both not possible (well 2 might be possible if you use JDK Dynamic proxies).
What you want to profile/monitor depends on your needs.
Basically there is no general answer to that. I also suggest you take a look at this package which already invented the wheel for you.