We are using Oracle Weblogic 10.3 as our application server. We have multiple modules that need to access an Object (contains some HashMaps) that is common for the managed server. This object will be populated via some other process on a daily basis. We do not want to have copies of this in each application, due to the large number of applications and limited memory. We cannot combine these into one ear since the individual (wars) would need to be updated on differing schedules.
I have tried creating an optional package and referencing it in two modules. The class being access just wraps calls to a singleton of the object. But what happens a separate singleton is created for each application, defeating the purpose.
It appears startup classes were deprecated sometime around or after 8.1, and now gone in 10.3.
Is there any way to have this object and other code “live” above the application/module level, have only one copy per jvm / managed server, and be accessible by all modules deployed to the same managed server?
Bonus points if the solution would also work in Tomcat.
Advertisement
Answer
It appears startup classes were deprecated sometime around or after 8.1, and now gone in 10.3.
Indeed. But they are “replaced” by an Application Life Cycle Events API so they are kinda still there.
Is there any way to have this object and other code “live” above the application/module level, have only one copy per jvm / managed server, and be accessible by all modules deployed to the same managed server?
Not exactly what you’re asking for but you could implement a service on top of a caching solution like EHCache and expose this service via a Stateless Session Bean or a Web Service (or even both). If this is not an option, can you clarify the exact need?