Thx for pointing me to the correct location in spring ref document. It works now with loadtimeweaving.
Is there a way where I can set some custom properties in the aspect class when using LTW?
For instance, using proxy approach I was setting some of the required properties on the Aspect as below
Code:
<bean name="SessionInterceptordvice" class="com.gtech.aop.SessionAOPInterceptor">
<property name="requiredProperty" value="testValue"/>
</bean>
Now my aspect looks like below when using LTW. How can I invoke setRequiredProperty() method? I need this property to be set before customeCreateDestination() is invoked? Any ideas?
Code:
@Aspect
public class SessionAOPIntercepto {
private String requiredProperty;
@Around("methodsToBeProfiled()")
public Object customCreateDestination(ProceedingJoinPoint call) throws Throwable {
//method implementation here
}
public void setRequiredProperty(String requiredProperty) {
this.requiredProperty = requiredProperty;
}
@Pointcut("execution(public * javax.jms.Session.create*(..))")
public void methodsToBeProfiled(){}
}