Am using aspectjweaver-1.6.3 & Spring -2.5.6.
Code:
<!-- Aop Config -->
<bean id="performanceAspectBean" class="com.xxx.yyy.aspect.PerformanceAspect" />
<aop:config>
<aop:pointcut id="samplePointCut" expression="execution(* com.xxx.yyy..*Endpoint.handle*(..)) or bean(*Dao)" />
<aop:aspect id="performanceAspect" ref="performanceAspectBean" order="11">
<aop:around pointcut-ref="samplePointCut" method="logExecutionTime" />
</aop:aspect>
</aop:config>
<bean id="sampleFunction" class="com.xxx.yyy.function.SampleFunctionImpl">
<property name="sampleDao" ref="sampleDao" />
</bean>
<bean id="sampleDao" class="com.xxx.yyy.dao.SampleDaoImpl">
....
....
</bean>
For every Endpoint & Dao call, am expecting 'performanceAspectBean' to be invoked.
Right now the behavior is fine for the endpoint; but for sampleDao, the performanceAspectBean is not getting invoked.