de.mcs.jmeasurement.spring.package.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JMeasurement Show documentation
Show all versions of JMeasurement Show documentation
JMeasurement profiling programs in production enviroment
This package contains classes and interfaces used to connect to a
spring enviroment. Since build 0.80.
In spring context you can define advices, pointcuts and advisors. All
this stuff you will find in the AOP package of spring. The only
JMeasuremant related point, is to use the right advice bean.
<bean id="advice" class="de.mcs.jmeasurement.spring.MeasureMethodInterceptor" />
the other stuff will be implemented as defaults
<!-- Poincut -->
<bean id="executePointcut" class="org.springframework.aop.aspectj.AspectJExpressionPointcut">
<property name="expression" value="execution(* de.mcs.MyClass.*(..)) or execution(* de.mcs.MySecondClass.*(..))" />
</bean>
<!-- advisor -->
<bean name="advisor" class="org.springframework.aop.support.DefaultPointcutAdvisor">
<property name="advice" ref="advice" />
<property name="pointcut" ref="executePointcut" />
</bean>
Now all methods of the 2 classes will be measured automatically.