0 Replies Latest reply on Jan 5, 2006 5:51 PM by hfarid

    clustred ejb3 MDB

    hfarid

      After a long day of digging the documentation and every posting I could not figure out what is the problem

      After a failure of the master node, the MDB on the slave simply does not connect to the queue

      my setup
      Node 1 : jboss 4.03+ejb3 in all mode, windows XP prof.
      Node 2: same but on linux machine
      (The configuration of the two instances are identical)

      I switch my DeafultDS from hypersonic to Mysql, that is used by both servers (in order to persist the messages in the same place)

      My MDB:

      /**
       *
       */
      @Clustered(partition="ASM")
      @MessageDriven(activateConfig =
       {
       @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
       @ActivationConfigProperty(propertyName="destination", propertyValue="queue/haq")
       })
       public class HaQListener implements MessageListener{
       public void onMessage(Message msg) {
      



      I defined my queue in server/all/deploy-hasingleton/jms/jbossmq-destinations-service.xml as follows

       <mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.mq.destination:service=Queue,name=haq">
       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
       </mbean>
      


      Note. jbossmq-destinations-service.xml is identical on both nodes

      Everything is alright untile the master (the one started first) dies
      on the other node I can see the following exception periodically
      17:47:05,861 INFO [MDB] Trying to reconnect to JMS provider
      17:47:15,867 ERROR [MDB] Reconnect failed: JMS provider failure detected:
      javax.naming.NameAlreadyBoundException
       at org.jnp.server.NamingServer.bind(NamingServer.java:129)
       at org.jnp.interfaces.NamingContext.bind(NamingContext.java:551)
       at org.jnp.interfaces.NamingContext.bind(NamingContext.java:516)
       at org.jboss.util.naming.Util.bind(Util.java:87)
       at org.jboss.util.naming.Util.bind(Util.java:74)
       at org.jboss.ejb3.EJBContainer.resolveInjectors(EJBContainer.java:479)
       at org.jboss.ejb3.EJBContainer.initializePool(EJBContainer.java:421)
       at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:374)
       at org.jboss.ejb3.mdb.MDB.start(MDB.java:223)
       at org.jboss.ejb3.mdb.MDB$ExceptionListenerImpl.onException(MDB.java:1187)
       at org.jboss.mq.Connection$ExceptionListenerRunnable.run(Connection.java:1366)
       at java.lang.Thread.run(Thread.java:595)
      17:47:15,867 INFO [MDB] Trying to reconnect to JMS provider
      
      


      I removed the queue defination frm the slave (destination...xml), same issue with the same exception

      After the master dies, I tried to connect to my queue using HA-JNDI lookup and I was able to do, actually I was able to submit messages on the queue

      Thanks in advance for your help