Spring AOP not getting invoked on Listener class
I am trying to log the incoming and out messages through an SMPP Channel.
So i have a Observer attached to this SMPP Channel, all loaded as a spring bean.
Now on the Observer/Listener class i have configured point-cut for the methods and associated an Advice.
Whenever any incoming messages comes to the SMPP channel, the Listener class's method is invoked, but the advice does not get triggered. When i moved same advice to another point-cut one layer at the business services. i.e. once the listener receives the messages and delegates to the business service. The advice gets invoked.
From the logs the Listener class is run by dameon thread..
i just have a log statement in the logSMPPTransaction method in the TransactionLogger class.
<bean name="smppChannel" class="com.demo.smpp.SMPPChannel" init-method="init">
<property name="observer" ref="smppListener" />
<bean name="smppListener" class="com.demo.smpp.SMPPListener"/>
<bean name="transactionLogger" class="com.demo.advice.TransactionLogger"/>
<aop:pointcut id="transaction" expression="execution(* com.demo.smpp.SMPPListener.*(..))"/>
<aop:before pointcut-ref="transaction" method="logSMPPTransaction"/>
Any help on this would be appreciated..