tc7 [
https://community.jboss.org/people/tc7] created the discussion
"Re: connecting a remote hornetQ server"
To view the discussion, visit:
https://community.jboss.org/message/729770#729770
--------------------------------------------------------------
Hans, I have a similar problem. My configuration is effectly the same as yours,
eg:
<*jms-connection-factories*>
<pooled-connection-factory name="hornetq-ra">
<transaction mode="xa"/>
<connectors>
<connector-ref
connector-name="*remote-jms*"/>
</connectors>
<entries>
<entry name="java:/remote-JmsXA"/>
</entries>
</pooled-connection-factory>
</jms-connection-factories>
....
<*connectors*>
...
<connector name="*remote-jms*">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="localhost"/>
<!-- replace with remote IP address-->
<param key="port" value="5445"/>
</connector>
</connectors>
The JMS client JBoss server connects to JMS queues hosted on the remote JBoss server.
Notes on the above config available here
https://community.jboss.org/message/722711#722711
https://community.jboss.org/message/722711#722711.
I find it all works fine until the remote JBoss server is restarted, then the recovery
exceptions occur, eg:
20120413 16:23:29,808 WARN [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016027: Local
XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMERR:
javax.transaction.xa.XAException: Error trying to connect to any providers for xa
recovery
at
org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:275)
[hornetq-jms-2.2.13.Final.jar:]
at
org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.recover(HornetQXAResourceWrapper.java:77)
[hornetq-jms-2.2.13.Final.jar:]
at
com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecovery(XARecoveryModule.java:503)
[jbossjts-4.16.2.Final.jar:]
at
com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.resourceInitiatedRecoveryForRecoveryHelpers(XARecoveryModule.java:471)
[jbossjts-4.16.2.Final.jar:]
at
com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.bottomUpRecovery(XARecoveryModule.java:385)
[jbossjts-4.16.2.Final.jar:]
at
com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:166)
[jbossjts-4.16.2.Final.jar:]
at
com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:789)
[jbossjts-4.16.2.Final.jar:]
at
com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371)
[jbossjts-4.16.2.Final.jar:]
Caused by: java.lang.IllegalStateException: Cannot create session factory, server locator
is closed (maybe it has been garbage collected)
at
org.hornetq.core.client.impl.ServerLocatorImpl.assertOpen(ServerLocatorImpl.java:1823)
[hornetq-core-2.2.13.Final.jar:]
at
org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:699)
[hornetq-core-2.2.13.Final.jar:]
at
org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.connect(HornetQXAResourceWrapper.java:321)
[hornetq-jms-2.2.13.Final.jar:]
at
org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:251)
[hornetq-jms-2.2.13.Final.jar:]
... 7 more
20120413 16:25:39,835 WARN [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016027: Local
XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMERR:
javax.transaction.xa.XAException: Error trying to connect to any providers for xa
recovery
at
org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:275)
[hornetq-jms-2.2.13.Final.jar:]
at
org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.recover(HornetQXAResourceWrapper.java:77)
[hornetq-jms-2.2.13.Final.jar:]
at
com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecovery(XARecoveryModule.java:503)
[jbossjts-4.16.2.Final.jar:]
at
com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.resourceInitiatedRecoveryForRecoveryHelpers(XARecoveryModule.java:471)
[jbossjts-4.16.2.Final.jar:]
at
com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.bottomUpRecovery(XARecoveryModule.java:385)
[jbossjts-4.16.2.Final.jar:]
at
com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:166)
[jbossjts-4.16.2.Final.jar:]
at
com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:789)
[jbossjts-4.16.2.Final.jar:]
at
com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371)
[jbossjts-4.16.2.Final.jar:]
Caused by: java.lang.IllegalStateException: Cannot create session factory, server locator
is closed (maybe it has been garbage collected)
at
org.hornetq.core.client.impl.ServerLocatorImpl.assertOpen(ServerLocatorImpl.java:1823)
[hornetq-core-2.2.13.Final.jar:]
at
org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:699)
[hornetq-core-2.2.13.Final.jar:]
at
org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.connect(HornetQXAResourceWrapper.java:321)
[hornetq-jms-2.2.13.Final.jar:]
at
org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:251)
[hornetq-jms-2.2.13.Final.jar:]
... 7 more
20120413 16:27:49,861 WARN [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016027: Local
XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMERR:
javax.transaction.xa.XAException: Error trying to connect to any providers for xa
recovery
at
org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:275)
[hornetq-jms-2.2.13.Final.jar:]
at
org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.recover(HornetQXAResourceWrapper.java:77)
[hornetq-jms-2.2.13.Final.jar:]
at
com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecovery(XARecoveryModule.java:503)
[jbossjts-4.16.2.Final.jar:]
at
com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.resourceInitiatedRecoveryForRecoveryHelpers(XARecoveryModule.java:471)
[jbossjts-4.16.2.Final.jar:]
at
com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.bottomUpRecovery(XARecoveryModule.java:385)
[jbossjts-4.16.2.Final.jar:]
at
com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:166)
[jbossjts-4.16.2.Final.jar:]
at
com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:789)
[jbossjts-4.16.2.Final.jar:]
at
com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371)
[jbossjts-4.16.2.Final.jar:]
Caused by: java.lang.IllegalStateException: Cannot create session factory, server locator
is closed (maybe it has been garbage collected)
at
org.hornetq.core.client.impl.ServerLocatorImpl.assertOpen(ServerLocatorImpl.java:1823)
[hornetq-core-2.2.13.Final.jar:]
at
org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:699)
[hornetq-core-2.2.13.Final.jar:]
at
org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.connect(HornetQXAResourceWrapper.java:321)
[hornetq-jms-2.2.13.Final.jar:]
at
org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:251)
[hornetq-jms-2.2.13.Final.jar:]
... 7 more
*It's worth pointing out that despite the above warnings new messages are still
delivered successfully.*
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/729770#729770]
Start a new discussion in JBoss AS 7 Development at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]