Adheep M [
https://community.jboss.org/people/adheep] created the discussion
"How does a @EJB dependency injection work on a Stateless Bean? Will that injected
class behave like an instance variable in that stateless session bean?"
To view the discussion, visit:
https://community.jboss.org/message/743539#743539
--------------------------------------------------------------
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 ? :-/
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/743539#743539]
Start a new discussion in EJB3 at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]