[jboss-user] [Beginner's Corner] - Re: Number of stateless beans

Wolf-Dieter Fink do-not-reply at jboss.com
Sat Jan 22 06:41:40 EST 2011

Wolf-Dieter Fink [http://community.jboss.org/people/wdfink] created the discussion

"Re: Number of stateless beans"

To view the discussion, visit: http://community.jboss.org/message/582493#582493

Stateless beans are managed by the container. I suppose you run the test is a single thread client.
In this case you have only one request at a time to the SLSB and the container reuse it.

reused by container, call multithreaded and you will see that the number of beans are increases.
You might also watch it by using the jmx- or admin console.

No SLSB are created on demand, it depends to the container configuration whether it will be destroyed or pool for reuse.
The SFSB reference is a proxy and the container will conect this reference on demand, you can not sure that two calls to a SLSB reach the same instance

EJB 3.1 future objects might be an option for you.
Also such kind of parallel (async) access can be handled by JMS (possible fire and forget or have a temporary back channel)
Or you start threads at client side, which is IMHO not a good idea, the other are more JEE ;-)

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110122/9835ca85/attachment-0001.html 

More information about the jboss-user mailing list