2 Replies Latest reply on Jan 28, 2002 7:07 AM by max goff

    MDB clustering in JBoss

    max goff Newbie

      I want to know how to achieve MDB clustering across more than one
      JBoss servers. Refer to the attached diagram. In one JBoss server,
      there will be a queue to which clients will be sending messages.
      These messages should be consumed by MDBs deployed in that JBoss
      server and by MDBs deployed in another JBoss server.

      If this possible, then how do I do this?

        • 1. Re: MDB clustering in JBoss
          Hiram Chirino Expert

          That's a peice of cake! in the 2nd jboss instance remove the jbossmq-service.xml and change the jms-service.xml as follows, look for the:

          <!-- The JMS provider loader -->

          DefaultJMSProvider

          org.jboss.jms.jndi.JBossMQProvider

          java:/XAConnectionFactory
          java:/XAConnectionFactory



          and replace it with:


          <!-- The JMS provider loader -->

          DefaultJMSProvider

          org.jboss.jms.jndi.JBossMQProvider

          remote.com:1099

          XAConnectionFactory
          XAConnectionFactory


          Where remote.com:1099 is the host-name:port of the JNDI service on the first node.

          • 2. Re: MDB clustering in JBoss
            max goff Newbie

            Thanks for the prompt reply!
            I tried what you said (in the 'second' JBoss server), but it failed. I removed jbossmq-service.xml and I modified jms-service.xml to have the following settings:
            <!-- The JMS provider loader -->

            DefaultJMSProvider

            org.jboss.jms.jndi.JBossMQProvider

            172.25.8.236:1099
            XAConnectionFactory
            XAConnectionFactory


            Here, 172.25.8.236 is the IP address of the 'first' JBoss server. Please tell me what I missed. Other than the above mentioned settings in jms-service.xml, all other settings are exactly the same in both JBoss host machines.

            The related snippet of the log console is:

            [17:08:07,309,AutoDeployer] Auto-deploying file:/D:/jboss-3.0.0alpha/deploy/RaterMdb.jar
            [17:08:07,319,AutoDeployer] Auto deploy of file:/D:/jboss-3.0.0alpha/deploy/RaterMdb.jar
            [17:08:07,319,J2eeDeployer#Default] Deploy J2EE application: file:/D:/jboss-3.0.0alpha/deploy/RaterMdb.jar
            [17:08:07,349,J2eeDeployer#Default] Create application RaterMdb.jar
            [17:08:07,349,J2eeDeployer#Default] install EJB module RaterMdb.jar
            [17:08:07,429,J2eeDeployer#Default] about to invoke deploy on jardeployer:JBOSS-SYSTEM:service=ContainerFactory
            [17:08:07,429,ContainerFactory] got to deploy in ContainerFactory
            [17:08:07,429,ContainerFactory] Deploying:file:/D:/jboss-3.0.0alpha/deploy/Default/RaterMdb.jar
            [17:08:07,520,ContainerFactory] Verifying file:/D:/jboss-3.0.0alpha/deploy/Default/RaterMdb.jar/ejb1003.jar
            [17:08:07,540,ContainerFactory] Deploying RATERBEAN
            [17:08:07,890,MessageDrivenContainer] Serious error in init:
            javax.naming.NameNotFoundException: ConnectionFactory not bound
            at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
            at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
            at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
            at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
            at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:365)
            at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349)
            at javax.naming.InitialContext.lookup(InitialContext.java:347)
            at org.jboss.ejb.plugins.jms.DLQHandler.init(DLQHandler.java:123)
            at org.jboss.ejb.plugins.jms.JMSContainerInvoker.init(JMSContainerInvoker.java:384)
            at org.jboss.ejb.MessageDrivenContainer.init(MessageDrivenContainer.java:165)
            at org.jboss.ejb.Application.start(Application.java:201)
            at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:382)
            at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:308)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
            at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
            at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:467)
            at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:444)
            at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:215)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
            at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)