Sanjeeb Kumar Sahoo wrote:
> Hi,
>
> Looks like I never got an answer to this question I had in the
> forwarded email. Now a user has similar doubt as seen here:
>
> http://forums.java.net/jive/thread.jspa?threadID=13439
>
> I will be glad if someone can clarify the scenario.
Hi Sahoo,
I posted a response.
--ken
>
>
> Thanks,
> Sahoo
>
> ------------------------------------------------------------------------
>
> Subject:
> @EJB to inject a EJB 3.0 style stateful session bean in a Servlet class
> From:
> Sanjeeb Kumar Sahoo <Sanjeeb.Sahoo_at_sun.com>
> Date:
> Thu, 22 Dec 2005 00:16:42 +0530
> To:
> servletapi-feedback_at_eng.sun.com, Gregory.Murray_at_sun.com
>
>
> Hi,
>
> I am not able to understand how one can inject a stateful session bean
> into a servlet using @EJB.
> e.g. this is what I am doing now:
>
> public class MyServlet extends HttpServlet {
> @EJB private ShoppingCart cart;
> public void service()... {
> cart.doSomething();
> }
> }
>
> Since injected stateful session bean (e.g.) cart will be shared by
> multiple threads executing servlet's service() and a stateful session
> bean instance only serves one request at a time, request processing
> can not happen concurrently, right? So how can I inject a stateful
> session bean and yet expect my request processing to happen concurrently?
>
> Thanks,
> Sahoo
>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net
>
>