Viggo Navarsete [
https://community.jboss.org/people/viggo.navarsete] created the
discussion
"Re: 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/743572#743572
--------------------------------------------------------------
Yes, you're correct! Whenever a new instance of PrimaryStatelessBean is created by the
EJB container (and since it's a stateless annotated bean, you will get a new one for
each request), then you will get injected a new instance of SecondaryStatelessBean (since
it's most likely also a stateless annotated bean, based on your naming convention),
and you will get access to the *one instance* of SimpleSingletonBean that has been created
by the EJB container (since it's a Singleton annotated bean).
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/743572#743572]
Start a new discussion in EJB3 at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]