5 Replies Latest reply on Mar 22, 2003 3:01 PM by mismo

    Using Remote Queue in MDB for JBoss 3.0.x

    suedehead33

      Is there a way where I can specify a MDB to get messages from a remote queue destination? How does one configure it?

      Here's the scenario:

      Server SRV-1:
      ~ JMS queue sender client
      ~ JMS queue destination

      Server SRV-2:
      ~ Message-driven Bean (MDB) running on JBoss 3.0.4

      Note: The EJB message-driven architecture is queue-based.

      The client app sends a message locally to the queue destination. How will the MDB (located at SRV-2) get the messages from the remote queue (located at SRV-1)?

      Thanks!

        • 1. Re: Using Remote Queue in MDB for JBoss 3.0.x
          florin_ganea

          Hi,

          As a beginner I understood that MDB is ment to be used with queues on local server.
          There are two facts:
          - MDBs cannot be accessed from outside the server (because they haven't Home nor Remote interfaces
          - no restriction is known for the location of queue (it can be specified along with jndi.properties, that is the destination queue can be in any JNDI namespace, even remote)

          I don't recommand using a remote queue for an MDB because the network can be a subject to breakdown more often than an individual system.

          I would use a local queue filled from time to time by an MBean that accesses the remote queue.

          I hope these thoughts will help,
          Florin

          • 2. Re: Using Remote Queue in MDB for JBoss 3.0.x

            Hi,

            I am not a JBoss expert, but I think the only way is to bring your external JMS Provider to JBoss server.

            You have to implement your JMS provider by extendig the AbstractJMSProvider and JMSProviderAdapter.

            Then you load it to JBoss JMX kernel and JNDI by implementing a loader that extends JMSProviderLoaderMBean and JMSProviderLoader.

            Then you do your container invoker for your MDB to use your new JMS Provider. This is done by extending JMSContainerInvoker.

            I know that some loaders for external JMS providers exist, but I don't know if somebody wants to share the code. I did not see anything on forum since the loader for SonicMQ. But it was for JBoss 2.x.

            Alex

            • 3. Re: Using Remote Queue in MDB for JBoss 3.0.x
              suedehead33

              thanks guys for the tips! we will check on this. one option is to use the clustering power of JBoss 3.0.x =D

              • 4. Re: Using Remote Queue in MDB for JBoss 3.0.x
                mismo

                There are aparently two ways:
                1) add fields to the jboss.xml deployment descriptor naming a different JNDI provider.
                2) change / add to jms-services.xml a JMS Provider with a ProviderURL value.

                JBoss documents list these as two ways to "remote" an MDB. See <http://www.jboss.org/online-manual/HTML/ch06s20.html>
                "Advanced MDB configuration"

                • 5. Re: Using Remote Queue in MDB for JBoss 3.0.x
                  mismo

                  There are aparently two ways:
                  1) add fields to the jboss.xml deployment descriptor naming a different JNDI provider.
                  2) change / add to jms-services.xml a JMS Provider with a ProviderURL value.

                  JBoss documents list these as two ways to "remote" an MDB. See <http://www.jboss.org/online-manual/HTML/ch06s20.html>
                  "Advanced MDB configuration"