Nope, as a rule you will have a limited number of stateless session beans 
at anyone
moment instantiated in your container, due to the nature of a stateless 
bean. The container
can 'garbage collect' them. Guess it will do that after some time out.

If you are seriously concerned about resource usage, my recommendation is 
not to tackle that in a ad hoc manner. Chapter 3 of Richard Monson-Haefels 
book: Enterprise Java Beans is a good reading to understand the difference 
between statefull and stateless and handles more stuff regarding resource 
usage.

FE

On Friday, May 11, 2001 12:47 PM, Joni Suominen [SMTP:[EMAIL PROTECTED]] 
wrote:
> Hi!
> This question should propably be asked in EJB-INTEREST mailing-list but
> I raise it here since I am not currently following it. So apologize me
> if you feel that this is a bit offtopic. The question is simple:
>
> Is it required to call the remove() method on stateless session bean
> after finishing using it or can the container automatically restore it
> to a pool (using Java garbage collection or DGC perhaps?)?
>
> For instance, the ATM example which ships with Orion don't use remove()
> after finishing the use of a stateless session bean instance. The same
> goes with Sun's Java Pet Store demo. On the other hand in Wrox Press's
> book "Professional Java Server Programming, J2EE Edition" they call
> remove() on stateless session beans.
>
> Currently I don't use remove() with stateless session beans. Should I?
>
> --
> Joni
> [EMAIL PROTECTED]
> 

Reply via email to