<div dir="ltr">Hello folks - just wanted to gain some clarity here<br><div><br><b>Section 1.2.2</b> of the spec doc states that <br><br>[quote] <i>Any session bean instance obtained via the dependency injection service is a contextual instance. It is bound to a lifecycle context and is available to other objects that execute in that context. The container automatically creates the instance when it is needed by a client. When the context ends,the container <b>automatically destroys the instance</b></i> [/quote]<br><br>(being a relative beginner) My first impression after reading this statement was the following - &quot;<i>If I use @Inject for DI of an EJB into my class, the CDI container takes over it&#39;s control and actually destroys the instance after the context ends</i>&quot;.<br><br>If we think in terms of @Stateless EJBs, this <i>might </i>not be the case, since the EJB container might choose to return the instance to back to the EJB pool (I understand that this is not mandated by the EJB spec). Keeping this in mind, do you think that the statement in section 1.2.2 is correctly framed since it seems as if the CDI container will actually destroy the EJB instance?<br><br>I think this is better specified in <b>Section 7.3.3</b> (this section dives in deeper)<br><br>[quote] <i>When the destroy() method is called, the container simply discards this internal reference</i>.[/quote]<br><br>This might be a minor thing - but I am just trying to provide a &#39;beginner&#39; point of view of and how he/she might interpret the contents of the specification with regards to its relationship with EJBs<br><br></div><div>Feel free to correct me in case I am missing something.<br></div><div><br>Best Regards<br>Abhishek<br></div></div>