6 Replies Latest reply on Oct 3, 2012 1:26 PM by Justin Bertram

    Exporting a JTA-enabled HornetQ ConnectionFactory

    Gregor Tudan Newbie

      Hi,

       

      we'd like to create a bridge from JBoss Messaging to Hornetq running as subsystem in JBoss 7.1.1. I got things working using the following config, except for QOS-Settings ONCE_AND_ONLY_ONCE.

       

       

       

       <subsystem xmlns="urn:jboss:domain:messaging:1.1">
                  <hornetq-server>
                     <!-- SHORTENED -->
      
                      <connectors>
                          <netty-connector name="netty" socket-binding="messaging"/>
                          <netty-connector name="netty-throughput" socket-binding="messaging-throughput">
                              <param key="batch-delay" value="50"/>
                          </netty-connector>
                          <in-vm-connector name="in-vm" server-id="0"/>
                      </connectors>
      
                      <acceptors>
                          <netty-acceptor name="netty" socket-binding="messaging"/>
                          <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">
                              <param key="batch-delay" value="50"/>
                              <param key="direct-deliver" value="false"/>
                          </netty-acceptor>
                          <in-vm-acceptor name="in-vm" server-id="0"/>
                      </acceptors>
      
                      <jms-connection-factories>
                          <connection-factory name="InVmConnectionFactory">
                              <connectors>
                                  <connector-ref connector-name="in-vm"/>
                              </connectors>
                              <entries>
                                  <entry name="java:/ConnectionFactory"/>
                              </entries>
                          </connection-factory>
                          <connection-factory name="RemoteConnectionFactory">
                              <connectors>
                                  <connector-ref connector-name="netty"/>
                              </connectors>
                              <entries>
                                  <entry name="RemoteConnectionFactory"/>
                                  <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>
                              </entries>
                          </connection-factory>
                          <pooled-connection-factory name="hornetq-ra">
                              <transaction mode="xa"/>
                              <connectors>
                                  <connector-ref connector-name="in-vm"/>
                              </connectors>
                              <entries>
                                  <entry name="java:/JmsXA"/>
                              </entries>
                          </pooled-connection-factory>
                      </jms-connection-factories>
      
                  </hornetq-server>
      </subsystem>
      

       

      JBoss-Messaging complaints, that it need a XAConnection Factory. I tried switching RemoteConnectionFactory to a pooled Connection-Factory so I can set transaction-mode to XA, but then the JNDI-Entry doesn't seem to get exported anymore. Is there another way for turning on XA on standard connection factories?

       

      Thanks, Gregor