Global application state can be stored in several locations. From a generic
standpoint, I would look at them in this order:
1. Put the global application state in a JNDI source. This would be
accessible to all objects anywhere in the network.
2. Put the state in a database.
3. Put the global application state in an RMI/CORBA singleton object. You
will have to step outside the EJB realm to accomplish this, but it would
allow you to update the state information from time to time.
4. Put the state in a stateless session bean. You would have to stop the
servers to make changes (or flush the beans if your server supports this).
5. Put the state in the EJB environment. This would allow the state to be
accessed by EJBs in the java:comp/env namespace, however each bean would
have to have its own settings.
6. Put the global application state in a static class. Not so easy to
propogate changes which is probably the intended goal.
jim
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Alexander
> Jerusalem
> Sent: Sunday, March 11, 2001 11:56 AM
> To: [EMAIL PROTECTED]
> Subject: [jBoss-User] Where to put global application state?
>
>
> Hi,
>
> can anyone give me advice on where to put global application state and how
> to load it at application startup? I need to keep some metadata,
> cached stuff,
> and so on available in memory for all EJBs. With Servlets, the place for
> such things is the ServletContext. But EJBs don't have access to the
> ServletContext.
>
> thanks,
>
> Alexander Jerusalem
> [EMAIL PROTECTED]
> www.vknn.org
>
> --
> Sent through GMX FreeMail - http://www.gmx.net
>
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
>
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]