Hi guys,
I have this question on the latest version EJB 3.1 has the "@EJB" annotation which is used for the dependency injection.
I have two stateless session bean and a singleton bean
@Stateless
public class PrimaryStatelessBean {
@EJB
SecodaryStatelessBean secondaryStatelessBean;
@EJB
SimpleSingletonBean simpleSingletonBean;
public String processRequest ( ) {
.....
secondaryStatelessBean.getValue();
simpleSingletonBean.getAnotherValue();
....
}
}
How does the @EJB annotation work, will the injected class behave like an Instance variable of the PrimaryStatelssBean ? :-/