4 Replies Latest reply on May 20, 2013 10:38 AM by chal

    Sending messages from JBoss As 7 (Hornetq) to outbound queue

    chal

      Hi,

       

      I'm new to jboss as 7(7.1.1.Final).We have a system currently running on jboss 5 and it is connected to a remote jms queue running on jboss 4(which is beyond our control) using ExternalContext .I want the jboss 7 to configure to do the same.I tried with the NettyConnectorFactory but I was not suceed and also checked about the JMS-Bridge but for that I need to have the bridge in the taget JMS server which is beyond our control.Please advice me the best way to achieve this.

      Thanks in advance.

        • 1. Re: Sending messages from JBoss As 7 (Hornetq) to outbound queue
          sfcoy

          Please show us the ExternalContext configuration you're using in JBossAS 5.x.

          • 2. Re: Sending messages from JBoss As 7 (Hornetq) to outbound queue
            chal

            Hi,

            Thanks for the reply.

             

            <!-- External context configuration of Cashcom Card Bridge for the purpose of binding to Riks JNDI namespace -->

               <mbean code="org.jboss.naming.ExternalContext" name="jboss.jndi:service=ExternalContext,jndiName=external/ExternalTestQueue">

                 <attribute name="JndiName">external/ExternalTestQueue</attribute>

                 <attribute name="Properties">

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

                 java.naming.provider.url=jnp://xxx.xxx.xxx.xxx:1099

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

                 </attribute>

                 <attribute name="InitialContext">javax.naming.InitialContext</attribute>

                 <attribute name="RemoteAccess">true</attribute>

                 <depends>jboss:service=Naming</depends>

               </mbean>

             

            And

             

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

             

            <!--

                 Purpose: This is intended for defining remote Bridge JMS provider and configure related stuff.

                 url:http://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/Specifying_the_MDB_JMS_Provider-org.jboss.jms.jndi.JMSProviderLoader_MBean.html

            -->

             

            <connection-factories>

             

               <!--

                   The JMS provider loader for Remote Bridge JMS Provider.

               -->

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

                      name="jboss.messaging:service=JMSProviderLoader,name=RemoteBridgeJMSProvider">

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

                  <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>

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

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

                  <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=jnp://xxx.xxx.xxx.xxx:1099

                  </attribute>     

               </mbean>

             

               <!--

                   JMS XA Resource adapter which is used to get transacted JMS.

               -->

               <tx-connection-factory>

                  <jndi-name>RemoteBridgeJmsXA</jndi-name>

                  <xa-transaction/>

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

                  <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:/RemoteBridgeJMSProvider</config-property>

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

                  <!--<security-domain-and-application>JmsXARealm</security-domain-and-application>-->

                  <!--<depends>jboss.messaging:service=ServerPeer</depends>-->     

               </tx-connection-factory>

             

            </connection-factories>

             

             

            Thanks

            • 3. Re: Sending messages from JBoss As 7 (Hornetq) to outbound queue
              jbertram

              So you want to sent a JMS message from JBoss AS7 to JBoss AS 4?  If so, check out https://github.com/jbertram/generic-jms-ra.  There is documentation there on how to integrate with JBoss Messaging, but you can do basically the same thing with JBoss MQ (the JMS implementation in JBoss AS 4).  You'll need to change the libraries in the module, but everything else should be pretty much the same.

              • 4. Re: Sending messages from JBoss As 7 (Hornetq) to outbound queue
                chal

                I think this is what I was looking for.

                Thank you very much Justin.