Is it possible to deploy an application as HA singleton in an EAP6 or EAP7 cluster
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
- 7.x
Issue
- I need to deploy my application only once in an EAP6 cluster
- Is there a implementation similar to the HASingletonDeployer in EAP5
- Is it possible to deploy MDB as a HA-Singleton in JBoss Cluster?
- How can I use the Singleton Deployment feature in EAP7?
Resolution
The feature requests AS7-4894 and the JBoss EAP RFE has been implemented and is available in EAP 7.0.0.GA.
Applications can be marked as 'Singelton Deployment' and will be started only once in a cluster.
EAP7 Singleton Deployment
A full working example is EAP7 ClusterHA Singleton Deployment and this works for standalone and domain mode.
EAP6 workaround for standalone mode
The following information has been provided by Red Hat, but is outside the scope of the posted Service Level Agreements and support procedures. The information is provided as-is and any configuration settings or installed applications made from the information in this article could make the Operating System unsupported by Red Hat Global Support Services. The intent of this article is to provide information to accomplish the system's needs. Use of the information in this article at the user's own risk.
If ha-singleton deployment is necessary it is strongly recommended to upgrade to EAP7 and use the supported feature for the Singleton Deployment!
In the interim it is possible to implement a workaround with a SingletonService. The Singleton in general is described in How to create a Singleton service in an EAP 6.
An example can be found in the quickstarts and the EAP 6 HASingleton Documentation.
Also attached to this article is an implementation of a simple HADeployer Service.
- The jboss-as-cluster-ha-singleton-deployer.jar can be dropped into standalone/deployments.
- It will automatically deploy all JAR/WAR/EAR in directory standalone/ha-deployments as HA-Singletons if the node is elected to start the singleton.
- The sources are attached as hasingeltondeployer.zip. It will contain a maven project which builds the jboss-as-cluster-ha-singleton-deployer.jar.
NOTES:
- Due to an incompatible interface, the service compiled against EAP6.0 will not work in EAP6.1. Please use the correct download for your EAP version.
- We strongly recommend you do not to use this workaround in production prior to EAP 6.0.1 due to an issue BZ 900714 during cluster merge.
Related article
How to create a Singleton service in an EAP 6 cluster
Root Cause
In EAP6.x the feature HASingletonDeployer is not implemented
Attachments
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments