2 Replies Latest reply on Mar 14, 2012 2:09 PM by bblasko

    Is it possible to use jms-jca provider with hornetq

    max2thousand

      Hi everyone,

      during these days I've tried to use the jms-jca provider to handle transactions, but if the things works well in jboss messaging, I cannot say the same with hornetq.

      I've tried to search everywhere for the correct configuration for hornetq and this provider, but without any luck.

      This is the code of the provider:

       

      <providers>

              <jms-jca-provider adapter="jms-ra.rar"

                  connection-factory="XAConnectionFactory" jndi-URL="jnp://127.0.0.1:1099"

                  jndi-context-factory="org.jnp.interfaces.NamingContextFactory"

                  jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces" name="JMS-JCA-Provider">

                  <property name="jcaActivationMapper"

                      value="org.jboss.soa.esb.listeners.jca.JBossActivationMapper" />

                  <jms-bus busid="quickstartGwChannel">

                      <jms-message-filter dest-name="queue/quickstart_jms_transacted_Request_gw"

                          dest-type="QUEUE" transacted="true" />

                  </jms-bus>

                  <jms-bus busid="quickstartEsbChannel">

                      <jms-message-filter dest-name="queue/quickstart_jms_transacted_Request_esb"

                          dest-type="QUEUE" transacted="true" />

                  </jms-bus>

                  <jms-bus busid="quickstartGwChannelStep2">

                      <jms-message-filter

                          dest-name="queue/quickstart_jms_transacted_Request_gw_step2"

                          dest-type="QUEUE" transacted="true" />

                  </jms-bus>

                  <activation-config>

                      <property name="dLQMaxResent" value="3" />

                  </activation-config>

              </jms-jca-provider>

          </providers>

      With this code everything starts fine, but If i try to push some messages into the queue, none of them is being processed.

      If otherwise I change the jms-jca to the jms provider all the messages are consumed well, but of course if the server goes down every message that hasn't been processed got lost.

       

      I've also tried to change the adapter from jms-ra.rar to hornetq-ra.rar, but in this case I get several errors like this one:

       

      17:45:45,103 SEVERE [HornetQActivation] Unable to reconnect org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@144adea destination=queue/quickstart_jms_transacted_Request_gw destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15)

      HornetQException[errorCode=2 message=Cannot connect to server(s). Tried with all available servers.]

       

      I use jboss-esb 4.9 and jboss as 5.1, with hornetq 2.2.5.

       

      Any help would be very very appreciated.

      Bye,

      Massimiliano