5 Replies Latest reply on Jun 17, 2015 11:44 AM by siddharth.rudra31

    How to migrate from JbossMQ to HornetQ ?

    siddharth.rudra31

      Hello Everyone,

       

      I am a newbie to JBOSS . I am migrating an application from JBOSS 4.2.3 to JBOSS EAP 6.4. In 4.2.3  we used JbossMQ for messaging. I found that HornetQ is the default messaging system in jboss eap 6.4 and JbossMQ is no more.My question is, is it possible to migrate from jbossMq to HornetQ ? If so , where I have to start ?.Else do I have to create JMS bridge ?

       

       

      Thanks in Advance

        • 1. Re: How to migrate from JbossMQ to HornetQ ?
          jaikiran

          What exactly do you mean by migration? Are you talking about moving the contents from MQ topics/queues to HornetQ?

          • 2. Re: How to migrate from JbossMQ to HornetQ ?
            siddharth.rudra31

            Hello Jaikiran,

             

            Actually in my application I am having JBoss MQ confgurations and MBeans files just like in this link 7.3. JBoss MQ Configuration and MBeans .To start the server in JBoss 4.2.3 and deploy the application ,I dump all the *.ear files, JBoss MQ configuration and MBeans and *ds.xml files  into deploy directory of jboss 4.2.3 . While migrating the application from JBoss 4.2.3 to JBoss EAP 6.4 I dumped all the *.ear files in the standalone/deployments directory and configured all the previous *ds-xml files in standalone-full-ha.xml. Now I am unable to figure out where I have to configure all the Jboss MQ configurations and MBeans . Please help me on this.

             

            Thanks.

            • 3. Re: How to migrate from JbossMQ to HornetQ ?
              jaikiran

              In JBoss AS7 (which is the base for JBoss EAP 6.x), MBeans aren't used to configure resources. So you won't find a one to one replacement for your JBoss MQ MBeans. This might give you an idea on what needs to be done when it comes to migrating How do I migrate my application from AS5 or AS6 to AS7 - JBoss AS 7.2 - Project Documentation Editor (although, it's based on JBoss Messaging, I think it will still help you understand the overall tasks that you have to do).

               

              Also take a look at the JMS messaging subsystem documentation here https://docs.jboss.org/author/display/AS72/Java+Message+Service+API+%28JMS%29

               

              Since you note, you are using EAP, it would be better if you actually read the EAP docs itself, which are here JBoss Enterprise Application Platform. If you need more involved help with the migration, you should open a support ticket via the support portal using your EAP account so that someone from the EAP team can help you with it.

              • 4. Re: How to migrate from JbossMQ to HornetQ ?
                siddharth.rudra31

                Thank you Jaikiran. This helps a lot

                • 5. Re: How to migrate from JbossMQ to HornetQ ?
                  siddharth.rudra31

                  my default/deploy/jms/jms-ds.xml looks like this :

                   

                  <?xml version="1.0" encoding="UTF-8"?>

                   

                  <connection-factories>

                   

                    <!-- ==================================================================== -->

                    <!-- JMS Stuff                                                            -->

                    <!-- ==================================================================== -->

                   

                    <!-- The JMS provider loader -->

                    <mbean code="org.jboss.jms.jndi.JMSProviderLoader"

                       name="jboss.mq:service=JMSProviderLoader,name=JMSProvider">

                      <attribute name="ProviderName">BatchJMSProvider</attribute>

                      <attribute name="ProviderAdapterClass">

                        org.jboss.jms.jndi.JNDIProviderAdapter

                      </attribute>

                      <!-- The combined connection factory -->

                      <attribute name="FactoryRef">XAConnectionFactory</attribute>

                      <!-- The queue connection factory -->

                      <attribute name="QueueFactoryRef">XAConnectionFactory</attribute>

                      <!-- The topic factory -->

                      <attribute name="TopicFactoryRef">XAConnectionFactory</attribute>

                      <attribute name="Properties">

                         java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory

                         java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

                         java.naming.provider.url=localhost:11099

                      </attribute>

                    </mbean>

                   

                    <!-- The server session pool for Message Driven Beans -->

                    <mbean code="org.jboss.jms.asf.ServerSessionPoolLoader"

                       name="jboss.mq:service=ServerSessionPoolMBean,name=batchJMSPool">

                      <depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>

                      <attribute name="PoolName">batchJMSPool</attribute>

                      <attribute name="PoolFactoryClass">

                        org.jboss.jms.asf.StdServerSessionPoolFactory

                      </attribute>

                    </mbean>

                   

                   

                    <!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->

                    <tx-connection-factory>

                      <jndi-name>BatchJmsXA</jndi-name>

                      <xa-transaction/>

                      <rar-name>jms-ra.rar</rar-name>

                      <track-connection-by-tx/>

                      <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>

                      <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>

                      <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/BatchJMSProvider</config-property>

                      <max-pool-size>20</max-pool-size>

                    </tx-connection-factory>

                   

                  </connection-factories>

                   

                  How can I configure the above content in JBoss As 7 ? I came to know the Resource Adapter can be configured in <subsystem xml ns="urn:jboss:domain:resource-adapters:1.0"> subsystem of standalone-full-ha.xml . What about JMSProviderLoader and ServerSessionPoolLoader Mbeans ?

                  Is it ok if I add schema like below to the above  MBean configuration and deploy it in JBoss as 7 ?

                   

                  <?xml version="1.0" encoding="UTF-8"?>

                   

                   

                  <server xmlns="urn:jboss:service:7.0"

                   

                   

                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                   

                   

                        xsi:schemaLocation="urn:jboss:service:7.0 jboss-service_7_0.xsd">

                   

                   

                  Please help me with this.

                   

                   

                  Thanks

                  Siddhartha Rudra.