Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.此内容没有您所选择的语言版本。
15.4. Enabling Clustering in your SwitchYard Application
To configure a cluster:
- Start two or more instances on different nodes.
- Indicate the services that are clustered in the
switchyard.xmlfile.
Note
By default, SwitchYard uses the default cache in the cluster cache container which comes pre-defined in the
standalone-ha.xml file.
You can control the services in the application that can be published in the cluster's runtime registry and the references that can be resolved by clustered services.
To enable a service to be published in the cluster's runtime registry, promote the service in the application and add a
<binding.sca> with clustering enabled to it.
<sca:service name="Goodbye" promote="GoodbyeBean/Goodbye"> <sca:interface.java interface="com.example.Goodbye"/> <sca:binding.sca sy:clustered="true"/> </sca:service>
<sca:service name="Goodbye" promote="GoodbyeBean/Goodbye">
<sca:interface.java interface="com.example.Goodbye"/>
<sca:binding.sca sy:clustered="true"/>
</sca:service>
To invoke a service in a cluster, promote the reference and add an SCA binding with clustering enabled.
<sca:reference name="Goodbye" multiplicity="0..1" promote="GreetingBean/Goodbye"> <sca:interface.java interface="com.example.Goodbye"/> <sca:binding.sca sy:clustered="true"/> </sca:reference>
<sca:reference name="Goodbye" multiplicity="0..1" promote="GreetingBean/Goodbye">
<sca:interface.java interface="com.example.Goodbye"/>
<sca:binding.sca sy:clustered="true"/>
</sca:reference>