users@glassfish.java.net

Re: V2 Threads, Instances and Stateless beans

From: <glassfish_at_javadesktop.org>
Date: Mon, 03 Nov 2008 10:18:06 PST

The EJB reference object that a caller holds is not the same thing as the bean instance. The
EJB reference is a proxy through which the caller invokes the target bean. When that call
reaches the container, the container either creates a new bean instance or reuses an existing
pooled bean instance, making sure that no more than one thread accesses a particular bean
instance at a time.

If you'd like to track the bean instances that are accessed on a particular series of calls, the
best thing to do is print out the pair of <thread id, this pointer> within the
bean instance.
[Message sent by forum member 'ksak' (ksak)]

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