2 Replies Latest reply on Jan 7, 2009 2:12 PM by Sujit Zingade

    MDBs failing to listen to remote topic/queues

    Sujit Zingade Newbie

      Hi,

      I am trying to configure a remote JMS[JMSServer] and MDB[MDBServer] to talk with topic/queue configured on remote JMS. I followed all steps as specified in http://www.jboss.org/community/docs/DOC-9892.

      When i start MDBServer, DEBUG logs does indicate that while deploying MDB, it is trying to use the Remote JMS provider I have configured, but the MDB is still listening to local JMS and not the remote JMS.

      Am I missing something ?

      I have few more questions related to configuration :
      - How does MDB knows which connection factory it needs to use to connect to remote destinations ?
      - Do we need to configue JMS[destinations+connection factories] on MDBServer where MDB is deployed.

      Quick help/guidance on this is highly appreciated.

        • 1. Re: MDBs failing to listen to remote topic/queues
          Clebert Suconic Master

          The link you provided is for JBossMQ, right?

          Are you trying to connect to a remote JBossMQ?


          All you need to do is to change jms-ds.xml:

          <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
           name="jboss.jms:service=JMSProviderLoader,name=JMSProvider">
           <attribute name="ProviderName">DefaultJMSProvider</attribute>
           <attribute name="ProviderAdapterClass">
           org.jboss.jms.jndi.JNDIProviderAdapter
           </attribute>
           <!-- The combined connection factory -->
           <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
           <!-- The queue connection factory -->
           <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
           <!-- The topic factory -->
           <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
           <!-- Uncomment to use HAJNDI to access JMS
           <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:1100
           </attribute>
           -->
           </mbean>
          


          Assuming you are trying to use a remote JBossMessaging:

          The ConnectionFactory you use here should just be a remote CF (java:/ means local), and you should keep the properties accordingly to the remote node.

          If you also have MDBs connecting locally, you should duplicate the configs on jms-ds and make sure your MDB is using the correct adapter.


          For more question regarding this, you would be better on finding help at JCA forum or EJB forum. (MDB is an EJB/EJB3 component.. not JBossMessaging)

          • 2. Re: MDBs failing to listen to remote topic/queues
            Sujit Zingade Newbie

            Thanks, changing java:/XAConnectionFactory to XAConnectionFactory solved my problem.