To have an app only deployed on one node in the cluster, deploy it in the /server/all/deploy-hasingleton directory. The app will only be deployed in the master (i.e. oldest running) node; if that nodes fails or is shut down it will be deployed in the next oldest node.
thanks for answering, but the question was sort of misunderstood :)
what happens is that I really want it to be deployed on all servers. The problem is that we have loads of services that are started on the app deploymen and if all the servers try to deploy at the same time the app will be anavailable for the time it takes to initialize the applications...
That would need to be handled by some kind of scripting you set up to roll the deployment out across your servers. Once something is copied to the deploy or farm directories, JBoss will deploy it. The only delayed-deployment option is the deploy-hasingleton folder I mentioned, which isn't what you need.
ok, but the default behaviour is to deploy one at a time??? or if the app takes a long time it will be anavailable as long as it takes to start up?
thanks a lot
Each server in the cluster deploys independently. If you start a server, once the app is deployed on that server and the server start is completed, the app is available on one node. As more servers finish their startup process, they (and the app) become available.
I think redeploy is a more significant issue. If at the same time you copy a new version of the app to the deploy dir of all the servers, it will be undeployed and redeployed on all the servers, and until redeploy is complete it won't be available. So, staggering the redeploys is an option to prevent this.
Suggest you experiment; that's the best way to learn what will happen. If deploying your app takes too long to experiment with, write a simple webapp that has a ServletContextListener that goes to sleep for 15-30 secs in the contextInitialized() callback. Then play around with different ways of deploying it on the cluster and observe what happens.
Here is a dummy question.
I installed full JBoss in XP.
My installation has server/default structure, is all just a replacement of default?
Also how to get farm directory?
Thanks a lot.
"All" is a superset of "default", containing additional services including clustering support.
The Farm directory will be in your "all" server, not the "default" server as the latter doesn't support clustering.