[jboss-user] [JBoss Seam] - Re: conceptual question about concurrency

wschwendt do-not-reply at jboss.com
Thu Sep 13 15:54:40 EDT 2007


anonymous wrote : But it also mentions that stateless beans can be accessed concurrently. So, what prevents the injected variables from being overwritten by injection from another concurrent thread? 

The EJB container ensures this. Session Beans are NOT multithreaded, neither stateless session beans (SLSBs) nor stateful session beans.  

If you have two threads referencing a stateless session bean (in your example the threads A and B),  both threads operate on a different bean instance. Therefore it cannot happen that the interceptor for thread B overwrites the injections for thread A.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084202#4084202

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084202



More information about the jboss-user mailing list