ello,
By definition Stateless Session Beans are stateless. How can you initialise
something that is stateless?
The alternatives are to use Stateful Session Beans or application scope
Java Beans in your JSP.
cheers
romen
IT Architect, Business And Data Services
IBM GSA
TEL: 612-84484716
FAX: 612-84484008
TIE: 84716
"Neal Kaiser" <[EMAIL PROTECTED]>@orionserver.com on 12/03/2001 12:25:14
Please respond to Orion-Interest <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
To: Orion-Interest <[EMAIL PROTECTED]>
cc:
Subject: Stateless Session Bean Initialization Pattern
Hi. I have a framework as follows:
A startup servlet reads in an XML file and creates a message bundle. This
message bundle will be used by Servlets and EJBs to pull resources from it.
I somehow need a way to initialize the stateless session bean by passing
the
message bundle to it. When the startup servlet starts, I get a reference to
the session bean and call init(MessageBundle).
However, this does not work because other instances of the session bean
will
not be initialized. I need some sort of static variable, or environment, or
some way I can get the original MessageBundle passed in from the startup
servlet.
Any suggestions on how I should handle this? I suppose one solution would
be to use JNDI and store the object in there. Are there any Orion examples
of how to do this?