-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Description
Andreas Schildbach opened SPR-4275 and commented
Consider the following example. I'm applying a profiling aspect to my annotated services like this:
aop:config
<aop:advisor advice-ref="serviceInterceptor" pointcut-ref="services" />
</aop:config>
<bean id="serviceInterceptor" class="org.springframework.aop.interceptor.JamonPerformanceMonitorInterceptor">
<property name="trackAllInvocations" value="true" />
</bean>
<bean id="services" class="org.springframework.aop.support.annotation. AnnotationMatchingPointcut">
<constructor-arg value="org.springframework.stereotype.Service" />
</bean>
Problem is, the names of the Jamon Monitors (as per AbstractTraceInterceptor.createInvocationTraceName ()) stem from the names of the interfaces (or abstract classes), not from the actual implementation classes. This is particularly annoying for interface methods that are inherited from a 'common' interface: Those only get one monitor for all implementations together - there is no way to distinguish.
My proposal is to find a way (via Spring configuration) so that the monitor names always stem from the implementing classes.
Affects: 2.5 final