-
1. Re: HASingleton-problem on >2 nodes
brian.stansberry Nov 21, 2007 9:58 AM (in response to greeneagle)Please describe exactly how you are deploying your singleton. I can guess from what you wrote, but I want to be sure.
My guess is that you packaged your singleton code in a sar and in the sar's jboss-service.xml included an mbean for your service and an mbean for an HASingletonController to control your service. Then you deployed the sar in deploy/ on A and B.
If that's what you did, it should work the way you want, and if it doesn't we need to investigate why not. -
2. Re: HASingleton-problem on >2 nodes
greeneagle Nov 21, 2007 10:20 AM (in response to greeneagle)I did it exactly the way you guessed. The only difference is that I deployed the sar in 'deploy-hasingleton/'.
The descriptor 'deploy-hasingleton-service.xml' is present in 'deploy' -
3. Re: HASingleton-problem on >2 nodes
brian.stansberry Nov 21, 2007 10:33 AM (in response to greeneagle)Put it in deploy, not deploy-hasingleton. Only one server in the cluster will even look at the contents of deploy-hasingleton, and if that server isn't one of the ones you want your service will not get deployed.
The deploy-hasingleton dir allows you to deploy stuff like ears, wars, ejb jars etc as singletons. With those types of things you can't directly specify an HASingletonController mbean to manage invoking a "startSingleton" and "stopSingleton" method on the deployment. So instead we wrote a service that will do an ordinary deployment of the contents of deploy-hasingleton only on the master node.
You're deploying an mbean, which gives you flexibility to do it the way I described. Put your sar in deploy on A and B.