Issue with ActiveMQXAConnectionFactory and Fuse Fabric
cgeer_cxt Apr 22, 2013 2:34 AMI have an existing application running on the vanilla Apache ServiceMix stack that I'm trying to get running on a JBoss Fuse ESB release using Fabric and having an issue with A-MQ using XA Transactions. So my baseline is that this application works fine on my current platform. When moving to Fabric I changed my connection string from connecting to an AMQ broker in the same VM to using the Fabric discovery (i.e. discovery:(fabric:default)). Whenever I use an ActiveMQXAConnectionFactory and I try to send a message the application just hangs forever. If I change it to use an ActiveMQConnectionFactory it all works as a champ (but I don't have XA transaction support which isn't what I want). Here are my two bean configs:
<bean id="activemqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="discovery:(fabric:default)" />
<property name="userName" value="mqconnection" />
<property name="password" value="password" />
</bean>
<bean id="activemqConnectionFactoryXa" class="org.apache.activemq.ActiveMQXAConnectionFactory">
<property name="brokerURL" value="discovery:(fabric:default)" />
<property name="userName" value="mqconnection" />
<property name="password" value="password" />
<property name="redeliveryPolicy">
<bean class="org.apache.activemq.RedeliveryPolicy">
<property name="maximumRedeliveries" value="0"/>
</bean>
</property>
</bean>
Something odd in the logs is that when I use the XA connection I start seeing messages like this which I don't see if I'm just using the non-XA connection:
2013-04-22 05:55:07,000 | DEBUG | ActiveMQ Task-1 | FailoverTransport | sport.failover.FailoverTransport 786 | 2242 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | urlList connectionList:[tcp://localhost:61616], from: [tcp://localhost:61616]
2013-04-22 05:55:07,001 | DEBUG | ActiveMQ Task-1 | FailoverTransport | sport.failover.FailoverTransport 990 | 2242 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Attempting 35th connect to: tcp://localhost:61616
2013-04-22 05:55:07,002 | DEBUG | ActiveMQ Task-1 | FailoverTransport | sport.failover.FailoverTransport 1040 | 2242 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Connect fail to: tcp://localhost:61616, reason: java.net.ConnectException: Connection refused
2013-04-22 05:55:07,002 | DEBUG | ActiveMQ Task-1 | TcpTransport | ivemq.transport.tcp.TcpTransport 520 | 2242 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Stopping transport tcp://localhost:61616
I went through all my configs and code and can't find any references to localhost:61616 so I'm not sure where it's getting that from. My AMQ broker is being created by deploying the stock MQ profile to another container (so it's running in a different container than my application).
I think this is my last roadblock in getting some portion of my application running on Fabric so any help is appreciated.
Thanks,
Chris