I haven't tried solving this problem myself, so am really just guessing.
I wonder if the thing to do is stash your serialized class in JNDI, and
then do a lookup and grab it when your session bean is instantiated?

I'm assuming you need acess to the information in an EJB as opposed to
a servlet; it seems that the rule against singletons is only for EJB's.

        Gary

elephantwalker ([EMAIL PROTECTED]) wrote:
> What I would like is to have the objects member variables of an application
> bean, so they would always be available, and in memory. Maybe that is the
> trick. Most of the time we create member variables in the scope of the
> session or even (if you are talking of servlets or jsp's) the page or
> servlet scope.
>
> Sun's latest and greatest Blueprint must use something like this, because
> they map their responses with xml, and  they couldn't be parsing the xml
> everytime the app got a request (that would be horribly slow).
>
> I am still investigating this issue.
>
> Regards,
>
> Elephantwalker
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Allen Fogleson
> Sent: Saturday, March 24, 2001 9:58 PM
> To: Orion-Interest
> Subject: RE: persistance
>
>
> why dont you create a class that parses them and another class that keeps
> the results in member variables...
>
> you could then serialize the class with the results. check the file dates
> whenever you need to get the results and reparse if necessary, otherwise
> just reload the serialized class.
>
> Al
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of elephantwalker
> Sent: Saturday, March 24, 2001 10:40 PM
> To: Orion-Interest
> Subject: persistance
>
>
> I have this problem with session beans. I have certain objects which I want
> to be persistant across all session beans. One approach is to use an entity
> bean. But that's a little overkill. These are several xml files which I use
> to setup some of the session beans properties, but they are not expected to
> change.
>
> Parsing the xml files each time a session is created is another approach.
> But that gives me the *lag time* during the parsing, and slows down my
> application.
>
> Is there another alternative? Can I load a bean each time the server is
> restarted, or when an event occurs (say, the *datetime* changes on the
> file)?
>
> Has anybody else faced this problem and solved it?
>
> regards,
>
> Elephantwalker
>
>
>
>
>


Reply via email to