Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 18. Managing Your Cluster
18.1. Cluster Copier lienLien copié sur presse-papiers!
18.2. Stateless Service Failover Copier lienLien copié sur presse-papiers!
18.3. ServiceInvoker Copier lienLien copié sur presse-papiers!
org.jboss.soa.esb.client.ServiceInvoker
) manages the delivery of messages to the specified Services. It also manages the loading of end-point references and the selection of couriers, thereby providing a unified interface for message delivery.
18.4. Load Balancing Copier lienLien copié sur presse-papiers!
18.5. Configure a Load-Balancing Policy Copier lienLien copié sur presse-papiers!
Procedure 18.1. Task
- Open the global configuration file in a text editor:
vi SOA_ROOT/jboss-as/server/PROFILE/deployers/esb.deployers/jbossesb-properties.xml
. - Scroll down to the org.jboss.soa.esb.loadbalancer.policy property. Set it with the policy you wish to use.
- Save the file and exit.
18.6. Load Balancing Policies Copier lienLien copié sur presse-papiers!
Policy Name | Description |
---|---|
first available | If a healthy service binding is found it will be used until it dies. The next end-point reference in the list will then be used. There is no load balancing between the two service instances with this policy. |
round robin | A standard load-balancing policy whereby each end-point reference is utilised in list order. |
random robin | This is like the round robin, but the selection is randomized. |
Note
18.7. Change the Registry's Cache's Lifespan Copier lienLien copié sur presse-papiers!
Procedure 18.2. Task
- Open the global configuration file in a text editor:
vi SOA_ROOT/jboss-as/server/PROFILE/deployers/esb.deployers/jbossesb-properties.xml
. - Scroll down to the section that contains property name="org.jboss.soa.esb.registry.cache.validityPeriod. Set this property (which is the time-out value) to what you require (the default is sixty seconds):
<properties name="core"> <property name="org.jboss.soa.esb.registry.cache.life" value="60000"/> <!-- 60 seconds is the default --> </properties>
<properties name="core"> <property name="org.jboss.soa.esb.registry.cache.life" value="60000"/> <!-- 60 seconds is the default --> </properties>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Save the file and exit.
The ServiceInvoker will obtain a fresh list of end-point references from the registry when this time value is exceeded.
18.8. Run the Same Service on More than One Node in a Cluster Copier lienLien copié sur presse-papiers!
Procedure 18.3. Task
- To run the same service on more than one node in a cluster, wait until the Registry's cache revalidates.
18.9. Remove Failed End-Point References from the Registry Copier lienLien copié sur presse-papiers!
Procedure 18.4. Task
- Open the
jbossesb-properties.xml
in a text editor:vi SOA_ROOT/jboss-as/server/PROFILE/deployers/esb.deployers/jbossesb-properties.xml
. - Scroll down to the section that contains org.jboss.soa.esb.failure.detect.removeDeadEPR. Set this property to true.
- Save the file and exit.
Warning
Note that the default setting is false because this feature should be used with extreme care. If it is employed, the end-point reference for a service that is simply overloaded and, therefore, slow to respond may, inadvertently, be removed by mistake. There will be no further interactions with these "orphaned" services you may have to restart them.
18.10. Support for Clustering in the BPEL Engine Copier lienLien copié sur presse-papiers!
18.11. Configure BPEL Clustering Copier lienLien copié sur presse-papiers!
Procedure 18.5. Task
- Open the
jboss-beans.xml
example file in your text editor. - Set the @database@ property to one of the following:
- mysql
- postgre
- db2
- sqlserver
- oracle
- sybase
- Save the file and exit.
- Copy the
jboss-beans.xml
file toSOA_ROOT/jboss-as/server/PROFILE/deploy/riftsaw.sar/META-INF/
. - Replace
SOA_ROOT/jboss-as/server/PROFILE/deploy/cluster/jboss-cache-manager.sar/META-INF/jboss-cache-manager-jboss-beans.xml
withriftsaw-cache-manager-jboss-beans.xml
.Warning
Attempting to install another BPEL Engine deployment can break the integration.Note
If you want to use the service that you have deployed onto the cluster, specify the load balancer's URL instead of the SOAP address in the WSDL file.
18.12. Deploy a BPEL Process on a Cluster Copier lienLien copié sur presse-papiers!
Procedure 18.6. Task
- Copy your BPEL artifact into the farm directory:
cp FILENAME.jar SOA_ROOT/jboss-as/server/PROFILE/farm
.Note
Remember that clustering is only available for the "production" and "all" profiles.Note
When you invoke your BPEL service, specify the load balancer's URL (instead of the SOAP address specified in the WSDL). The load balancer will then decide which of the cluster's servers to use.