users@glassfish.java.net

Re: Is it safe for multiple users to use one and the same SLSB stub?

From: <glassfish_at_javadesktop.org>
Date: Mon, 04 Jun 2007 10:30:57 PDT

It's not stated explicitly in the spec, but it is the guaranteed behavior. Each invocation on a
reference to a stateless session bean is handled by a bean instance that is not already processing
another request. From the EJB container's perspective it makes no difference whether two
concurrent requests arrive from invocations on the same SLSB reference or two different SLSB
references for the same bean.

In the case of Stateful Session Beans, what's relevant is not the concurrency of the reference
object, but rather the target bean. If a particular SFSB is already in the midst of handling
a request and a second one arrives for the same bean identity, the container typically rejects
the second request with an exception. EJB Containers are allowed to serialize the concurrent
requests as well, although that's not the behavior SUN's EJB container.

 --ken
[Message sent by forum member 'ksak' (ksak)]

http://forums.java.net/jive/thread.jspa?messageID=220396