-
1. Re: @In vs. @EJB
gavin.king Jul 1, 2006 11:45 AM (in response to bambata)Right, @In is handled by Seam, and is aware of the Seam names and Seam contexts. For stateless beans there is not really a whole lot of difference between the two. In that case, they are each just sugar over a JNDI lookup. For stateful beans they are very different.
-
2. Re: @In vs. @EJB
bambata Jul 10, 2006 6:38 AM (in response to bambata)So, in case of a stateless Bean Seam uses for Injection via @In a common
JNDI-lookup to the containers registry(ENC) ? -
3. Re: @In vs. @EJB
sebasfiorent Jul 10, 2006 9:36 AM (in response to bambata)"gavin.king@jboss.com" wrote:
For stateful beans they are very different.
Gavin, can you explain more precissely which is the difference with stateful beans between @In and @EJB, because I need to choose the correct annotation if they behave different.
Regards
Sebastian -
4. Re: @In vs. @EJB
norman.richards Jul 10, 2006 11:02 AM (in response to bambata)@EJB is EJB injection. For a stateful bean, you will get a new instance created when your other been is created. Think of it as a private instance that Seam knows nothing about - nobody else can inject that instance. For stateful components, you are more likely to want instances to live in a seam-managed context. (converstion, session, whatever) To et that, use @In.
-
5. Re: @In vs. @EJB
gavin.king Jul 10, 2006 1:50 PM (in response to bambata)"bambata" wrote:
So, in case of a stateless Bean Seam uses for Injection via @In a common
JNDI-lookup to the containers registry(ENC) ?
In the case of a SLSB, @In does a JNDI lookup (global or ENC). In the case of a JavaBean, it does a new. -