Jamon Start and Stop

Help
Arjun Gona
2010-08-26
2013-05-20
  • Arjun Gona

    Arjun Gona - 2010-08-26

    Hi,
    Can you please respond to the below questions?
    1. Is it ok to have nested start and stop methods? For example I added start and stop in class B methods and also in class A. But some methods of B are called from A. Is it ok to put start and stop for those methods in B which are called from A?
    2. Is there anyway to add AOP configuration to include needed classes for monitoring rather than adding start and stop statements in each method the class ?

    thanks
    Arjun

     
  • Steve Souza

    Steve Souza - 2010-08-26

    <<1. Is it ok to have nested start and stop methods?>>
    yes

    << For example I added start and stop in class B methods and also in class A. But some methods of B are called from A. Is it ok to put start and stop for those methods in B which are called from A?
    >>
    yes

    <<2. Is there anyway to add AOP configuration to include needed classes for monitoring rather than adding start and stop statements in each method the class ? >>
    Yes.  For example here is how ejb's can be monitored without modifying any code using AOP.   http://jamonapi.sourceforge.net/#ejbmonitoring

    Also, it is good to keep in mind that HTTP, JDBC, Log4J can all be monitored without changing your code.  In addition any interface can be monitored with one method call for the entire interface.  You could set up a method that you can pass your interface too.  Here is info on interface monitoring.   http://jamonapi.sourceforge.net/#monitoringinterfaces

    For interface monitoring you should hide jamon in your own utils class, something like this

    YourInterface obj=(YourInterface) YourUtils.monitor(new MyObjectWithInterface());

    Now all obj method calls will be monitored. i.e. obj.method1(), obj.method2(int) etc will be monitored.

    In addition others have added a few lines of code and used jamon with AOP.   Google jamon aop.  Here is one example.

    Here's another example.
    http://templth.blogspot.com/2004/11/integrate-jamon-with-spring.html

    Steve

     
  • Arjun Gona

    Arjun Gona - 2010-08-27

    thanks Steve!

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks