Version 28

    !! This page is out of date

     

     

    Enabling Access to a Remote JBoss Messaging Instance

     

    This document describes how to add remote access to a JBoss Messaging JMS provider from within your JBoss 4.X application server instance. Completing the configuration procedure described below will allow you to deploy and run Message Driven Beans on a JBoss server instance that doesn't have a co-located JMS provider.

     

    The document also contains various checkpoints (such as expected log messages) on the path to a successful configuration.

     

    The installation can be tested by deploying an MDB that uses the remote JMS instance. The MDB container requires access to the client-side Messaging libraries and their dependencies (AOP, Remoting). Because the server's default AOP and Remoting libraries are most likely incompatible with Messaging's, the MDB container also needs to be a scoped. The deployment of a scoped MDB container is described in the companion document, "[Deploying a scoped MDB Container|DOC-10657]".

     

     

    1 Make sure the JMS resource adapter RAR is available to the AS instance

     

    Move the JMS resource adapter RAR (jms-ra.rar) to $JBOSS_HOME/server/<your-configuration>/deploy/jms from $JBOSS_HOME/server/<your-configuration>/deploy

     

    2. Deploy the JCA datasource

     

    Move the JCA datasource deployment descriptor jms-ds.xml from $JBOSS_HOME/server/<your-configuration>/deploy/jms to $JBOSS_HOME/server/<your-configuration>/deploy 

     

    Update the connection factory refs as presented below:

     

      ....
    
    <connection-factories>
    
      <!-- The JMS provider loader -->
      <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
             name="jboss.mq:service=JMSProviderLoader,name=JMSProvider">
      ....
        <attribute name="FactoryRef">/XAConnectionFactory</attribute>
        <attribute name="QueueFactoryRef">/XAConnectionFactory</attribute>
        <attribute name="TopicFactoryRef">/XAConnectionFactory</attribute>
      ....
      </mbean>
     
      ....
    
    </connection-factories>
    

     

    *Note*

    You must adjust java.naming.provider.url to match the actual JNDI URL of your JBoss Messaging server.

     

    *Checkpoint*

    A successful datasource deployment produces a log entry similar to:

       01:09:12,292 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:name=JmsXA,service=ConnectionFactoryBinding' to JNDI name 'java:JmsXA'

     

     

    3. Bye bye JBossMQ

     

    Remove the remains of JBossMQ by deleting $JBOSS_HOME/server/<your-configuration>/deploy/jms

     

    4. Start the AS instance

     

    *Checkpoint*

    After start up, you can check whether the JMS resource adapter was correctly deployed by looking for the "jboss.jca:name='jms-ra.rar',service=RARDeployment" service in the JMX Console.

     

     

    5. Make sure your JBoss Messaging server is up and running

     

     

    6. Test the deployment

     

    Deploy a scoped MDB and send a message to the queue the MDB was configured with. If the installation procedure was successful, the MDB should receive the message.

     

    The process of deploying a scoped MDB container that connects to JBoss Messaging is described in Deploying a scoped MDB Container.

     

     

    Referenced by: