Hi out there
I am trying to connect a jboss as 7.1.0 with another jboss that should only act as a hornetQ server (2.2.11).
I see that in the ejb subsystem
<mdb>
<resource-adapter-ref resource-adapter-name="hornetq-ra"/>
<bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
</mdb>
is configured.
In the message subsystem I use a connector
<connectors>
<connector name="netty">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="xxxxx"/>
<param key="port" value="5745"/>
</connector>
</connectors>
that is referenced from the connection pool
<pooled-connection-factory name="hornetq-ra">
<transaction mode="xa"/>
<connectors>
<connector-ref connector-name="netty"/>
</connectors>
<entries>
<entry name="java:/JmsXA"/>
</entries>
</pooled-connection-factory>
All this works fine, except of an error/warning I receive a few seconds after I have started the server.
15:54:20,640 WARN [org.hornetq.jms.server.recovery.HornetQXAResourceWrapper] Can't connect to any hornetq server on recovery [XARecoveryConfig [hornetQConnectionFactory=HornetQConnectionFactory [serverLocator=ServerLocatorImpl [initialConnectors=[org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5745&host=xxxxx], discoveryGroupConfiguration=null], clientID=null, dupsOKBatchSize=1048576, transactionBatchSize=1048576, readOnly=false], username=null, password=null]]
15:54:20,656 WARN [com.arjuna.ats.jta] 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.11.Final.jar:]
at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.recover(HornetQXAResourceWrapper.java:77) [hornetq-jms-2.2.11.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: HornetQException[errorCode=2 message=null]
at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.connect(HornetQXAResourceWrapper.java:351) [hornetq-jms-2.2.11.Final.jar:]
at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:251) [hornetq-jms-2.2.11.Final.jar:]
... 7 more
15:54:20,703 WARN [org.hornetq.jms.server.recovery.HornetQXAResourceWrapper] Can't connect to any hornetq server on recovery [XARecoveryConfig [hornetQConnectionFactory=HornetQConnectionFactory [serverLocator=ServerLocatorImpl [initialConnectors=[org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5745&host=xxxxx], discoveryGroupConfiguration=null], clientID=null, dupsOKBatchSize=1048576, transactionBatchSize=1048576, readOnly=false], username=null, password=null]]
The queue is found and I can send and receive messages. I use annotations like this
@MessageDriven(name="MyMDB", activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "global/myQueue"),
@ActivationConfigProperty(propertyName = "user", propertyValue = "guest"),
@ActivationConfigProperty(propertyName = "password", propertyValue = "guest")...
for the mdb.
Can anybody help me with the XA warning? I suppose all I have to do is to configure username and passwort in the right manner. I read something about ra.xml and the resource-adapters subsystem, but I could not find out how to set any properties.
Perhaps there is even a better way to combine a remote hornetQ server with the use of annotations. I am not happy having the messaging subsystem (not present in a standalone.xml without hornetq) in my configuration. Can I delete some portions just leaving the client-part of the jms configuration?
Thx very much for help.
hans