It seems (at least on version 0.8.3) that
stateless session beans do not act as "real"
stateless session beans. In "Enterprise JavaBeans"
(Monson-Haefel, O'Reilly, p. 189-190) stateless
session beans are said to be created by the container
and not buy the client.

"Stateless bean instances enter the Method-Ready
pool as the container needs them. When the EJB server
is first started, it will probably create a number of 
stateless bean instances and enter them into the Method-
Ready Pool. When the number of stateless instances 
servicing client request is insufficient, more can be
created and added to the pool."

"... The ejbCreate( ) method is invoked only once
in the life cycle of the stateless session bean;
when the client invokes the create() method on the
EJB home, it is NOT delegated to the bean instance."

When I did a test on a stateless session bean, I noticed,
that every time I called create on the home interface,
a new stateless session bean was created (ejbCreate
was called) instead of using the ones in the Method-
Ready pool.

Have I missunderstood the concept or have I not configured
OrionServer correctly? What is the difference between 
stateless and statefull session beans, if it is not
the way they are handled by the container?

Juha Lehtonen

Reply via email to