Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-4661

Provide Support for Clustered Singleton MDBs

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Minor Minor
    • 10.0.0.Final
    • 10.0.0.Alpha1
    • Clustering, JMS
    • None
    • Documentation (Ref Guide, User Guide, etc.), Release Notes, Compatibility/Configuration

      Provide Support for Clustered Singleton MDBs.

      Provide annotation and configuration support to mark such MDB deployments Clustered Singleton MDBs.

      When "Clustered Singleton MDBs" are deployed in a cluster; only one node (server) is active to consume messages serially. When the node fails; another the active node's "Clustered Singleton MDBs" starts consuming the messages.

      To mark an MDB as clustered singleton, one can either use the clustered-singleton xml element, like this:
      <jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
      xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:c="urn:clustering:1.1"
      xmlns:d="urn:delivery-active:1.1"
      xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
      version="3.1"
      impl-version="2.0">
      <c:clustering>
      <ejb-name>HelloWorldQueueMDB</ejb-name>
      <c:clustered-singleton>true</c:clustered-singleton>
      </c:clustering>
      </jboss:ejb-jar>

      Or one can use the @org.jboss.ejb3.annotation.ClusteredSingleton in your MDB class.

      This feature requires no extra configuration at the server, apart from running the service in a cluster.

              flaviarnn Flavia Rainone
              flaviarnn Flavia Rainone
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: