0 Replies Latest reply on Jul 22, 2004 5:47 PM by James Adams

    Making a (singleton) MDB run in only one node of a cluster

    James Adams Novice

      I have a message-driven EJB which is listening to a queue which can only have a single listener (the queue can only be dequeued by one listener) so when I have one node running in a cluster a second node can't start due to this restriction (at least this is what appears to be going on). I am running both nodes using an Oracle AQ JMS Provider patch, and I have the Message-Driven EJB using a singleton configuration (this setup works fine in a non-clustered setting).

      Below is the start of the exception messages I get on the second node after running the first node on another machine (with no errors):

      17:27:47,983 ERROR [DLQHandler] Initialization failed DLQHandler
      javax.jms.JMSException: Error creating the dlq connection: DLQ not bound
      at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:171)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:237)
      at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:164)

      The nodes can see each other, as seen by the following messages:

      17:27:38,499 INFO [DefaultPartition] Number of cluster members: 2
      17:27:38,499 INFO [DefaultPartition] Other members: 1
      17:27:38,499 INFO [DefaultPartition] Fetching state (will wait for 60000 milliseconds):
      17:27:39,210 INFO [HANamingService] Listening on /
      17:27:39,220 INFO [DetachedHANamingService$AutomaticDiscovery] Listening on /
      , group=, HA-JNDI address=

      What can I do to make it so that the MDB is only started once, so that only the first node's MDB listens to the queue ?

      My systems are running Windows XP and JBoss 3.2.5, the JMS Provider is an Oracle Advanced Queue (using the patch provided for the JBoss/OAQ JMS Provider from sourceforge.net).

      Thanks in advance for any suggestions.