Hi Frank,

I was wandering how I can control/influence the lifetime of my stateless 
bean, as I am storing some data in private variables to overcome large 
calculation times, so that the next time a web user requests the same data 
it's already there (after a fixed time I do refresh it if the same data is 
still stored in the private variable).

So in a way I think I need a kind of "static" statefull session bean such 
that all clients have the same  session bean.

What are your ideas about this ?

Eddie



>From: Frank Eggink <[EMAIL PROTECTED]>
>Reply-To: Orion-Interest <[EMAIL PROTECTED]>
>To: Orion-Interest <[EMAIL PROTECTED]>
>Subject: RE: Stateless bean and remove
>Date: Fri, 11 May 2001 19:48:49 +0200
>
>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]
> >
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Reply via email to