Announcement Announcement Module
No announcement yet.
Profile Spring methods using annotation Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Profile Spring methods using annotation

    Hi ,

    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.

    My queries:-

    1) Can we profile a private methods
    2) Final methods
    3) If we profile service whether we need to profile the DAO as well?

    Please clarify.


  • #2
    @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.