HornetQ 2.0 to 2.1 beta3 upgrade: consumerCount = 0
chrlon May 11, 2010 7:08 PMI am trying to upgrade from 2.0 to 2.1.0_beta3 using a stand alone HornetQ together with Jboss AS 5.1. The setup is running fine on 2.0 but with 2.1 the queues does not register my MDB consumers (consumerCount = 0 in jconsole) and no messages are consumed even though the queues are not empty. The only configuration change I have done from 2.0 to 2.1 (except from upgrading the jars) is changing to org.hornetq.core.remoting.impl.netty.NettyConnectorFactory in ra.xml.
Any idea why the MDB consumers does not register with hornetq? (looking at netstat the there is a netty connection between AS and HornetQ)
ra.xml
{code:xml}
<?xml version="1.0" encoding="UTF-8"?><!-- $Id: ra.xml 76819 2008-08-08 11:04:20Z jesper.pedersen $ --><connector xmlns="http://java.sun.com/xml/ns/j2ee"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://java.sun.com/xml/ns/j2eeversion="1.5"><description>HornetQ 2.0 Resource Adapter</description><display-name>HornetQ 2.0 Resource Adapter</display-name><vendor-name>Red Hat Middleware LLC</vendor-name><eis-type>JMS 1.1 Server</eis-type><resourceadapter-version>1.0</resourceadapter-version><license><description>Copyright 2009 Red Hat, Inc.Red Hat licenses this file to you under the Apache License, version2.0 (the "License"); you may not use this file except in compliancewith the License. You may obtain a copy of the License atUnless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express orimplied. See the License for the specific language governingpermissions and limitations under the License.</description><license-required>true</license-required></license><resourceadapter><resourceadapter-class>org.hornetq.ra.HornetQResourceAdapter</resourceadapter-class><config-property><description>The transport type</description><config-property-name>ConnectorClassName</config-property-name><config-property-type>java.lang.String</config-property-type><config-property-value>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</config-property-value><!--config-property-value>org.hornetq.integration.transports.netty.NettyConnectorFactory</config-property-value --></config-property><config-property><description>The transport configuration. These values must be in the form of key=val;key=val;</description><config-property-name>ConnectionParameters</config-property-name><config-property-type>java.lang.String</config-property-type><config-property-value>host=10.10.48.20;port=5445</config-property-value></config-property><!-- config-property><description>Use XA?</description><config-property-name>UseXA</config-property-name><config-property-type>java.lang.Boolean</config-property-type><config-property-value>true</config-property-value></config-property --><config-property><description>Should clean server shutdown trigger failover?</description><config-property-name>FailoverOnServerShutdown</config-property-name><config-property-type>java.lang.Boolean</config-property-type><config-property-value>true</config-property-value></config-property><outbound-resourceadapter><connection-definition><managedconnectionfactory-class>org.hornetq.ra.HornetQRAManagedConnectionFactory</managedconnectionfactory-class><config-property><description>The default session type</description><config-property-name>SessionDefaultType</config-property-name><config-property-type>java.lang.String</config-property-type><config-property-value>javax.jms.Queue</config-property-value></config-property><config-property><description>Try to obtain a lock within specified number of seconds; less than or equal to 0 disable this functionality</description><config-property-name>UseTryLock</config-property-name><config-property-type>java.lang.Integer</config-property-type><config-property-value>0</config-property-value></config-property><connectionfactory-interface>org.hornetq.ra.HornetQRAConnectionFactory</connectionfactory-interface><connectionfactory-impl-class>org.hornetq.ra.HornetQRAConnectionFactoryImpl</connectionfactory-impl-class><connection-interface>javax.jms.Session</connection-interface><connection-impl-class>org.hornetq.ra.HornetQRASession</connection-impl-class></connection-definition><transaction-support>XATransaction</transaction-support><authentication-mechanism><authentication-mechanism-type>BasicPassword</authentication-mechanism-type><credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface></authentication-mechanism><reauthentication-support>false</reauthentication-support></outbound-resourceadapter><inbound-resourceadapter><messageadapter><messagelistener><messagelistener-type>javax.jms.MessageListener</messagelistener-type><activationspec><activationspec-class>org.hornetq.ra.inflow.HornetQActivationSpec</activationspec-class><required-config-property><config-property-name>destination</config-property-name></required-config-property></activationspec></messagelistener></messageadapter></inbound-resourceadapter></resourceadapter></connector>{code}
jms-ds.xml
{code:xml}
<connection-factories>
<mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="hornetq:service=JMSProviderLoader,name=JMSProvider">
<attribute name="ProviderName">DefaultJMSProvider</attribute>
<attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
<attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
<attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
<attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
</mbean>
<!--
JMS XA Resource adapter, use this to get transacted JMS in beans
-->
<tx-connection-factory>
<jndi-name>JmsXA</jndi-name>
<xa-transaction/>
<rar-name>jms-ra.rar</rar-name>
<connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>
<config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Queue</config-property>
<config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
<!--config-property name="ConnectionParameters" type="java.lang.String">host=10.10.48.20;port=5445</config-property-->
<!--config-property name="ConnectionParameters" type="java.lang.String">port=5445</config-property-->
<max-pool-size>200</max-pool-size>
<security-domain-and-application>JmsXARealm</security-domain-and-application>
</tx-connection-factory>
</connection-factories>
{code}