3 Replies Latest reply on Jan 14, 2010 8:36 AM by Tim Fox

    Migrating JBossMQ queues to HornetQ

    Philip Lee Newbie

      Hi,

       

      (JBossAS 4.2.3GA, HornetQ 2.0.0GA, JRE6)

       

      I've tried to replicate my JBossMQ queue configuration in HornetQ but I get this error during my application startup:

       

      Cannot create a consumer with a null destination
      javax.jms.InvalidDestinationException: Cannot create a consumer with a null destination
              at org.hornetq.jms.client.HornetQSession.createConsumer(HornetQSession.java:373)
              at org.hornetq.jms.client.HornetQSession.createConsumer(HornetQSession.java:359)
              at org.hornetq.jms.client.HornetQSession.createReceiver(HornetQSession.java:817)
              at org.hornetq.ra.HornetQRASession.createReceiver(HornetQRASession.java:890)

              ...

       

       

      The JBossMQ entries are like this:

       

      <mbean code="org.jboss.mq.server.jmx.Queue"
            name="jboss.mq.destination:service=Queue,name=QUEUE1">
           <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
               <attribute name="JNDIName">jms/QUEUE1</attribute>
        </mbean>

       

      and the new entries in hornetq-jms.xml have the form:

       

          <queue name="QUEUE1">
              <entry name="jms/QUEUE1"/>
          </queue>

       

      Any ideas as to what is going wrong? Do I need some extra config?

       

      Also, deploy/conf/standardjboss.xml has this element <CreateJBossMQDestination>true</CreateJBossMQDestination> :

       

          <invoker-proxy-binding>
            <name>message-driven-bean</name>
            <invoker-mbean>default</invoker-mbean>
            <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
            <proxy-factory-config>
              <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
              <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
              <CreateJBossMQDestination>true</CreateJBossMQDestination>

              ...

       

      Does this need changing (as it does if replacing JBossMQ with JBM 1.4.5) ?

       

      Thanks,

       

          Phil.