JBoss Community

Re: Number of stateless beans

created by Wolf-Dieter Fink in Beginner's Corner - View the full discussion

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.

 

1)

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.

 

2)

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

 

3)

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