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

7.5. JMS Clustering Notes


When one node in JBoss Messaging cluster goes down, its buddy in the cluster loads all of the dead server's messages from the database.
If the dead node was performing an XA transaction when it went down, the transaction log may have been written but the associated messages may move to another server in the cluster.
When the dead server comes back to life, the recovery manager may try to recover the transactions stored in the transaction log. If the messages have been moved to another server, it is impossible to acquire the proper XAResource from the local JMS provider, because the associated messages are no longer on that server. The result is that JBoss Transaction Service returns:
Could not find new XAResource to use for recovering non-serializable XAResource
Copy to Clipboard Toggle word wrap
To resolve this, add a JMS provider and a Recovery Manager for each node in the cluster. For example, if the cluster had three nodes, add this to jbossts-properties.xml:
<property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.JBMESSAGINGREMOTE1"
          value="org.jboss.jms.server.recovery.MessagingXAResourceRecovery;java:/RemoteJMSProvider1"/>
   
      <property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.JBMESSAGINGREMOTE2"
          value="org.jboss.jms.server.recovery.MessagingXAResourceRecovery;java:/RemoteJMSProvider2"/>
Copy to Clipboard Toggle word wrap
The remote providers are configured in JBOSS_HOME/server/default/deploy/jms-ds.xml:
<mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="jboss.jms:service=JMSProviderLoader,name=RemoteJMSProvider">
   <attribute name="ProviderName">MyRemoteJMSProvider</attribute>
   <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
   <attribute name="FactoryRef">XAConnectionFactory</attribute>
   <attribute name="QueueFactoryRef">XAConnectionFactory</attribute>
   <attribute name="TopicFactoryRef">XAConnectionFactory</attribute>
   <attribute name="Properties">
      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
      java.naming.provider.url=192.168.1.172:1099
   </attribute>
</mbean>
Copy to Clipboard Toggle word wrap

Note

The java.naming.provider.url should resolve to the IP address and port of the remote JMS instance.
The JNDI properties are configured to connect to the remote nodes in the cluster. Add providers and recovery managers to each node in the cluster for all the other nodes of the cluster in order to get proper recovery.
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