I have a web service app running on WebLogic 10.3. Recently, I created a cluster so the app would run on multiple servers and share resources. I have a ServletContextListener
to which I bind/unbind properties/objects at server startup/shutdown.
With a single server, this works great. However, in the cluster, when one server goes down, the context listener (contextDestroyed
method) is invoked and everything is unbound from the context (the other servers can no longer use the resources then). Is there another listener I could use or is there a way to run the contextDestroyed
method only when the last server in the cluster is being shutdown?
Any help would be appreciated. I'm kinda new to WebLogic and Java EE in general.
I would use a SingletonService for controlling the resources on a cluster