1 Reply Latest reply on Feb 12, 2014 9:11 AM by Radoslav Husar

    Exclude some beans from being deployed as clustered in jboss-ejb3.xml?

    Daniel Nuss Newbie

      Hi,

       

      i have a project with many EJBs, most of them stateless session beans plus one or two singleton beans. Now i want to deploy this application into an clustered environment and to do so, make all the stateless session beans clustered. To avoid marking them one by one, i used the following wildcard in jboss-ejb3.xml:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <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.0" xmlns:s="urn:security: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">
        <assembly-descriptor>
          <c:clustering>
            <ejb-name>*</ejb-name>
            <c:clustered>true</c:clustered>
          </c:clustering>
        </assembly-descriptor>
      </jboss:ejb-jar>
      
      

       

      However, i don't want the Singleton beans to be marked as clustered (otherwise i get the deployment error "JBAS014549: @Clustered annotation is currently not supported for singleton EJB"). Is it possible somehow to use the wildcard but at the same time exclude some beans from being deployed as clustered within jboss-ejb3.xml?