[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Setting annotated field attribute using AspectJ
|
Hi ,
I had a EJB class like this:
@Stateful(name="My_Account_Bean")
@Remote({examples.Account.class})
public class AccountBean implements Account{
private ArrayList items;
private Collection stuff;
@JndiInject(jndiName="MyJndi_EJB")
private Service service;
@PostConstruct
public void initialize() {
items = new ArrayList();
}
public void sayHelloFromAccountBean()
{
service.sayHelloFromServiceBean();
}
}
I'm able to identify the @JndiInject field attribut using the following
pointcut:
pointcut dependencyJ(JndiInject annotation) : get(@JndiInject * *) &&
@annotation(annotation) ;
Object around(JndiInject annotation) : dependencyJ(annotation){
System.out.println(" Aspecting for Annotated Field -- " );
System.out.println("======= : "+annotation.jndiName());
return proceed(annotation);
}
Is it possible to manipulate the annotated @JndiInject attribute in the
advice?
I tried with set(@JndiInject * *) , but it doesnt help me...
Thanks in advance,
cheers,
Zia
--
View this message in context: http://www.nabble.com/Setting-annotated-field-attribute-using-AspectJ-tp17483085p17483085.html
Sent from the AspectJ - users mailing list archive at Nabble.com.