This content has been marked as final.
Show 2 replies
-
1. Re: EJB 2.0 - SLSB - Lifecycle/class member/thread safe ques
gladiatornado Sep 19, 2006 11:54 AM (in response to gladiatornado)Correction, the class member variables in the SLSB are reinitialized in every method.
-
2. Re: EJB 2.0 - SLSB - Lifecycle/class member/thread safe ques
victork Sep 19, 2006 11:54 PM (in response to gladiatornado)According to EJB Spec, Session beans are non-reentrant i.e. one instance can only service one client at a time. This should be true for all EJB containers, including JBoss.
Quoting the 2.0 spec:Non-reentrant instances
The container must ensure that only one thread can be executing an instance at any time. If a client
request arrives for an instance while the instance is executing another request, the container may throw
the java.rmi.RemoteException to the second request if the client is a remote client, or the
javax.ejb.EJBException if the client is a local client.[6]
Note that a session object is intended to support only a single client. Therefore, it would be an
application error if two clients attempted to invoke the same session object.