<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
connecting a remote hornetQ server
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/hans-juergen.stemmer.vkb.de">Hans Steiner</a> in <i>JBoss AS 7 Development</i> - <a href="https://community.jboss.org/message/729620#729620">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi out there</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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).</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I see that in the ejb subsystem </p><p>     <mdb></p><p>                <resource-adapter-ref resource-adapter-name="<strong>hornetq-ra"</strong>/></p><p>                <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/></p><p>     </mdb></p><p>is configured.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>In the message subsystem I use a connector</p><p>               <connectors></p><p>                    <connector name="<strong>netty</strong>"></p><p>                        <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class></p><p>                        <param key="host" value="xxxxx"/></p><p>                        <param key="port" value="5745"/></p><p>                    </connector></p><p>                </connectors></p><p>that is referenced from the connection pool </p><p>                <pooled-connection-factory name="<strong>hornetq-ra</strong>"></p><p>                        <transaction mode="xa"/></p><p>                        <connectors></p><p>                            <connector-ref connector-name="<strong>netty</strong>"/></p><p>                        </connectors></p><p>                        <entries></p><p>                            <entry name="java:/JmsXA"/></p><p>                        </entries></p><p>                    </pooled-connection-factory></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>All this works fine, except of an error/warning I receive a few seconds after I have started the server.</p><blockquote class="jive-quote"><p>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],<strong> username=null, password=null</strong>]]</p><p>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</p><p>    at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:275) [hornetq-jms-2.2.11.Final.jar:]</p><p>    at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.recover(HornetQXAResourceWrapper.java:77) [hornetq-jms-2.2.11.Final.jar:]</p><p>    at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecovery(XARecoveryModule.java:503) [jbossjts-4.16.2.Final.jar:]</p><p>    at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.resourceInitiatedRecoveryForRecoveryHelpers(XARecoveryModule.java:471) [jbossjts-4.16.2.Final.jar:]</p><p>    at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.bottomUpRecovery(XARecoveryModule.java:385) [jbossjts-4.16.2.Final.jar:]</p><p>    at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:166) [jbossjts-4.16.2.Final.jar:]</p><p>    at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:789) [jbossjts-4.16.2.Final.jar:]</p><p>    at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [jbossjts-4.16.2.Final.jar:]</p><p>Caused by: HornetQException[errorCode=2 message=null]</p><p>    at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.connect(HornetQXAResourceWrapper.java:351) [hornetq-jms-2.2.11.Final.jar:]</p><p>    at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:251) [hornetq-jms-2.2.11.Final.jar:]</p><p>    ... 7 more</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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]]</p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The queue is found and I can send and receive messages. I use annotations like this</p><p>@MessageDriven(name="MyMDB", activationConfig = {</p><p>@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),</p><p>@ActivationConfigProperty(propertyName = "destination", propertyValue = "global/myQueue"),</p><p>@ActivationConfigProperty(propertyName = "user", propertyValue = "guest"),</p><p>@ActivationConfigProperty(propertyName = "password", propertyValue = "guest")...</p><p>for the mdb.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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.</p><p>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?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Thx very much for help.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>hans</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/729620#729620">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS 7 Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>