users@glassfish.java.net

Re: Problem (bug?) using _at_EJB annotation

From: <glassfish_at_javadesktop.org>
Date: Wed, 21 Mar 2007 09:10:22 PST

Each injection of an @EJB field for a stateful session bean creates a new stateful session bean
identity. In your code, it's a stateless session bean instance that defines the @EJB. That
simply means that each stateless session bean instance that is created will have a reference
to a stateful session bean. However, each time your client calls the stateless session bean,
there is no guarantee as to which stateless session bean instance will process the request.
That's why it's possible for more than one client thread to be returned the same stateful
session bean.

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

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