2 Replies Latest reply on Jan 28, 2005 3:03 PM by Adrian Brock

    Configure MDB to talk to a remote queue on a cluster with JB

    Luis Urueña Newbie

      Hi all!

      I have a cluster with two instances on the same computer, and a JbossMQ HASingleton configured in one of the nodes. This JbossMQ instance does management of one test queue called test/testQueue. On the other hand I have a client which sends JMS messages to the queue (it's working properly by means of HAJNDI), and a MDB receiving those messages.

      After I've read the wiki "HowDoIConfigureAnMDBToTalkToARemoteQueue" I decided to use JNDIProviderAdapter class for access cluster with a remote Jms provider, through HAJNDI too (like sender client). So, I configured this jms provider, the invoker-proxy-binding and the MDB following wiki's advices.

      This is the code of the Jms provider (HAJNDI)

       <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="jboss.mq:service=JMSProviderLoader,name=RemoteJMSProvider,server=remotecluster">
       <attribute name="ProviderName">RemoteClusterJMSProvider</attribute>
       <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</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=jboss.naming:org.jnp.interfaces
       java.naming.provider.url=192.168.24.13:1100,192.168.24.13:1200
       </attribute>
       </mbean>
      


      Once I'm running this example, I get an timeout exception because can't connect to the remote HAJNDI port. The cause is:

      Failed to retrieve stub from server 192.168.24.13:1100
      


      It seems like the request to 192.168.24.13:1100 is not an HAJNDI client request, even jms provider has HAJNDI configuration. And exactly, if I change port 1100 to 1099 (JNDI port) all the system runs correctly. So...


      What's the problem in this example?
      What I cannot access to a queue on remote cluster from a MDB with HAJNDI?
      Does anybody know how can I do it?

      My best regards,


        • 1. MDB in a cluster talking to a remote queue on another cluste
          Luis Urueña Newbie

          Hi

          Now I'm testing (with Jboss 4.0.1) another configuration. In one computer have a cluster of two instances, which has the JBossMQ HASingleton server. Now in the other computer there are another cluster of two instances with the MDBs. These MDBs are bound by means of a RemoteJMSProvider like in the previous post.

          When I test this system, I get another different exception.

          javax.jms.JMSException: Error creating the dlq connection: XAConnectionFactory
          


          After testing the example of the first post, and this recent example, I take some conclusions:

          1) If the JNDIProviderAdapter is configured for url provider for JNDI with (i.e. 192.168.24.13:1099), the configuration runs properly

          2) However, if is configured for url provider for HAJNDI (i.e. 192.168.24.13:1100), the server lookups in the local host, regardless the HAJNDI host specifIED.

          Is this correct, or I'm doing something wrong?
          And the same question, how can I configure the server so that the MDBs can access the remote queue, placed in a cluster, with HAJNDI?


          • 2. Re: Configure MDB to talk to a remote queue on a cluster wit
            Adrian Brock Master

            Questions about HAJNDI should be targetted at the clustering forum.
            You might also want to post its configuration, don't you think?