WebLogic clustered singleton service
The installation steps are detailed in Automatic Migration of User-Defined Singleton Services:
- Implement the Singleton Service Interface
-
Deploy it and Configuring the Migration Behavior
- Package and deploy the singleton service within an application (in weblogic-application.xml).
~ or ~ - Deploy the singleton service as a standalone service within WebLogic Server (in config.xml).
- Optionally, configure the migration behavior of the singleton service.
- Package and deploy the singleton service within an application (in weblogic-application.xml).
Also have a look at Configure a Singleton Service in the Administration Console Online Help.
XpiritO
Updated on June 04, 2022Comments
-
XpiritO almost 2 years
I am currently trying to implement a singleton service over WebLogic, using a WebLogic cluster. I've read some literature about clustered singleton services on WebLogic, and I know I have to implement weblogic.cluster.singleton.SingletonService interface on the object I want to clusterize as a singleton.
import weblogic.cluster.singleton.SingletonService; public class SingletonOrchestrator implements SingletonService { public void activate() { System.out.println(":: activate CALLED FOR SingletonOrchestrator"); } public void deactivate() { System.out.println(":: deactivate CALLED FOR SingletonOrchestrator"); } (...) }
I'm able to deploy this as an application on WebLogic, although it doesn't seem to invoke
activate()
anddeactivate()
methods after deployment. I don't know what else I have to do in order to have this working as a singleton service in my WebLogic cluster.Does anybody have experience with this? Can anyone provide a working example and explain to me what else I have to do?