Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

17.14. Enabling Clustering in ModeShape


A ModeShape configuration can have a "clustering" fragment that defines the name of the cluster and the JGroups configuration:
<mode:clustering clusterName="modeshape-cluster" configuration="jgroups-modeshape.xml" />
Copy to Clipboard Toggle word wrap
The "clusterName" is a string that is a logical name of the cluster; all engines connecting to the same name form a cluster. Any messages multicast from one engine in the cluster will be received by all other members of the cluster. Again, the cluster name is independent of the repositories managed by th
The "configuration" value is a string that is one of:
  • the absolute file system path to the file containing the JGroups XML configuration;
  • the relative file system path to the file containing the JGroups XML configuration, relative to the current working directory of the Java process;
  • the name of a resource on the classpath containing the JGroups XML configuration;
  • the URL that can be resolved to the JGroups XML configuration; or
  • the string representation of JGroups configuration, either in XML format or the older string format.
If the "configuration" property is not given, ModeShape will use the default JGroups configuration (as defined by the specific JGroups version).

Note

Note that all engines in the cluster must have the same JGroups configuration. In fact, all engines in the cluster will almost always have exactly the same ModeShape configuration.
Here is an example of a "clustering" fragment defining a cluster named "modeshape-cluster" using the JGroups configuration defined in the "jgroups-modeshape.xml" file at the supplied URL:
<clustering clusterName="modeshape-cluster" 
	  configuration="file://some/path/jgroups-modeshape.xml" />
Copy to Clipboard Toggle word wrap
This next example uses the JGroups configuration defined in the "jgroups-modeshape.xml" resource file on the classpath (or as an absolute path on a *nix system):
<clustering clusterName="modeshape-cluster" 
	  configuration="/some/path/jgroups-modeshape.xml" />
Copy to Clipboard Toggle word wrap
Next is an example that specifies the JGroups configuration using the older string representation of the form:
<clustering clusterName="modeshape-cluster" 
	  configuration="PROTOCOL(param=value;param=value):PROTOCOL:PROTOCOL" />
Copy to Clipboard Toggle word wrap
Of course, the "configuration" property can be specified as a child element, too (line breaks added for readability):
<clustering clusterName="modeshape-cluster">
	     <configuration>UDP(max_bundle_size="60000":max_bundle_timeout="30"):
		                  PING(timeout="2000"):...</configuration>
</clustering>
Copy to Clipboard Toggle word wrap
And finally an example that specifies the JGroups configuration using the newer XML representation (line breaks added for readability):
<clustering clusterName="modeshape-cluster">
	 <configuration><![CDATA[<config><UDP max_bundle_size="60000" 
	      max_bundle_timeout="30".../><PING timeout="2000"/>...</config>]]>
	 </configuration>
</clustering>
Copy to Clipboard Toggle word wrap
Note that the this example uses a child XML element for the "configuration", along with a CDATA section, so that the XML configuration can be nested within the ModeShape configuration.

Warning

Remember to specify the system workspace name for each repository that is clustered.
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat