2 Replies Latest reply on Nov 9, 2010 8:43 AM by magiccreative

    Clustered MDB configuration / JNDI problem

    ejb3workshop

      I am trying to deply an EJB3 MDB into a cluster of 2 nodes. Running the bean on a single VM works well without any problems, however I am not able to bring the second VM online. During the startup the following error is reported :


      15:21:26,484 ERROR [FarmMemberService] Incomplete Deployment listing:

      --- MBeans waiting for other MBeans ---
      ObjectName: jboss.mq.destination:service=Queue,name=BatchJobProcessorMDB
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=DestinationManager

      ObjectName: jboss.mq.destination:service=Queue,name=TransactionProcessorsMDB
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=DestinationManager

      ObjectName: jboss.mq.destination:service=Queue,name=OutputProcessorsMDB
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=DestinationManager

      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: jboss.mq:service=DestinationManager
      State: NOTYETINSTALLED
      Depends On Me:
      jboss.mq.destination:service=Queue,name=BatchJobProcessorMDB
      jboss.mq.destination:service=Queue,name=TransactionProcessorsMDB
      jboss.mq.destination:service=Queue,name=OutputProcessorsMDB


      on the second node. It is always the second node started. The first one alwasy succeeds. I found that the JNDI context on the second node is much smaller then the context on the first one. The Destination Manager as well as most standard Queues aren't listed on the JMX-console.

      I tried to configure the queue deploying this services file into the all/farm folder:

      <?xml version="1.0" encoding="UTF-8"?>
      <server>
       <mbean code="org.jboss.mq.server.jmx.Queue"
       name="jboss.mq.destination:service=Queue,name=BatchJobProcessorMDB">
       <attribute name="JNDIName">queue/BatchJobProcessors</attribute>
       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
       </mbean>
       <mbean code="org.jboss.mq.server.jmx.Queue"
       name="jboss.mq.destination:service=Queue,name=TransactionProcessorsMDB">
       <attribute name="JNDIName">queue/TransactionProcessors</attribute>
       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
       </mbean>
       <mbean code="org.jboss.mq.server.jmx.Queue"
       name="jboss.mq.destination:service=Queue,name=OutputProcessorsMDB">
       <attribute name="JNDIName">queue/OutputProcessors</attribute>
       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
       </mbean>
      </server>
      


      If you have any suggestion on how I can get MDB working in a JBoss cluster and how I can fix the JNDI issue please let me know

      Thanks in advance
      Alex

        • 1. Re: Unable to inject jndi dependency: env/.../queue into propert
          ejb3workshop

          Deploying the beans without defining the queues via the services succeeds, but during the execution the following errors are reported on the second node :

           

           


          15:46:02,000 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.2.1.GA/server/all/farm/ABCEJB.jar
          15:48:28,703 INFO [BatchJobProcessor] Instantiating BatchJobProcessors
          15:48:28,718 ERROR [JmsServerSession] Unexpected error delivering message org.jboss.mq.SpyMapMessage {
          Header {
          jmsDestination : QUEUE.BatchJobProcessors
          jmsDeliveryMode : 2
          jmsExpiration : 0
          jmsPriority : 4
          jmsMessageID : ID:13-11906453102031
          jmsTimeStamp : 1190645310203
          jmsCorrelationID: null
          jmsReplyTo : null
          jmsType : null
          jmsRedelivered : false
          jmsProperties : {}
          jmsPropReadWrite: false
          msgReadOnly : true
          producerClientId: ID:13
          }
          }
          java.lang.RuntimeException: Unable to inject jndi dependency: env/com.abc.backend.BatchJobProcessor/queue into property com.abc.backend.BatchJobProcessor.queue: queue not bound
          at org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:76)
          at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:88)
          at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:83)
          at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:55)
          at org.jboss.ejb3.AbstractPool.create(AbstractPool.java:111)
          at org.jboss.ejb3.StrictMaxPool.get(StrictMaxPool.java:141)
          at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:245)
          at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:268)
          at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:138)
          at $Proxy98.onMessage(Unknown Source)
          at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:178)
          at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:891)
          at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
          at org.jboss.mq.SpySession.run(SpySession.java:323)
          at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:237)
          at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
          at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
          at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
          at java.lang.Thread.run(Thread.java:619)
          Caused by: javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: queue not bound]
          at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1069)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:702)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
          at org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:69)
          ... 20 more
          Caused by: javax.naming.NameNotFoundException: queue not bound
          at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
          at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
          at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
          at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
          at javax.naming.InitialContext.lookup(InitialContext.java:392)
          at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1063)
          ... 23 more
          15:48:28,859 INFO [BatchJobProcessor] Instantiating BatchJobProcessors
          15:48:28,859 ERROR [JmsServerSession] Unexpected error delivering message org.jboss.mq.SpyMapMessage {
          Header {
          jmsDestination : QUEUE.BatchJobProcessors
          jmsDeliveryMode : 2
          jmsExpiration : 0
          jmsPriority : 4
          jmsMessageID : ID:13-11906453102031
          jmsTimeStamp : 1190645310203
          jmsCorrelationID: null
          jmsReplyTo : null
          jmsType : null
          jmsRedelivered : true
          jmsProperties : {JMS_JBOSS_REDELIVERY_COUNT=1}
          jmsPropReadWrite: false
          msgReadOnly : true
          producerClientId: ID:13
          }
          }
          java.lang.RuntimeException: Unable to inject jndi dependency: env/com.abc.backend.BatchJobProcessor/queue into property com.abc.backend.BatchJobProcessor.queue: queue not bound
          • 2. Re: Clustered MDB configuration / JNDI problem
            magiccreative

            hi,

             

            sry for waking up an old post but I have the same problem. Does anyone know how to configure ha jms queue in a cluster?