I believe that the servletContext which can meet the bill for you. Have a
servlet initialize on loading the application, you can control that in the
web.xml. Whenever the slsb is initialized, pass the servelet context, and
get your application class with a servletContext.getAttribute("myClass").

You can also get a env reference, and let the slsb get the reference (if its
a simple object you want).



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of SCOTT FARQUHAR
Sent: Wednesday, May 02, 2001 10:48 PM
To: Orion-Interest
Subject: Stateless Session Beans


I'm hoping that someone can help me with this.

Can you have a stateless session bean that actually has class variables?

Ie I want to have a variable that is loaded once per application, and then
accessed by all the whole application.

I know that SLSB are pooled and created and destroyed at will - but will
they be created with the variable containing a value?

Any thoughts are much appreciated.

Scott



Reply via email to