users@glassfish.java.net

An object that runs for the lifetime of the application server???

From: <glassfish_at_javadesktop.org>
Date: Fri, 23 Nov 2007 10:35:36 PST

Hi,

What I am trying to do is have an object instantiated at the startup of the application server, stay alive for the lifetime of server and only shut down when the server shuts down.

I want to be able run this component to store state information in runtime memory. Like keeping maps or lists in runtime memory so I don't always have to keep going back to the database for information.

During it's lifetime I want this object to be able to communicate with other application server components (EJBs, make database calls, etc) and be able to have other server components communicate with it.

I was thinking a Custom MBean may be the way to go, but is there something I'm missing from the standard Java EE architecture that would allow for an object like this? Custom MBeans just seem to have a number of issues when interacting with EJBs and other Java EE 5 components.

Any help would be very much appreciated.
[Message sent by forum member 'bkatnich' (bkatnich)]

http://forums.java.net/jive/thread.jspa?messageID=246958