How to exclude some EJBs to be marked as clustered when using wildcard via jboss-ejb3.xml ?
Issue
- While deploying an EJB Based application which contains some
@Singleton
beans it is noticed that it shows the following error message:
JBAS014549: @Clustered annotation is currently not supported for singleton EJB
- This is because the
"$EJB_JAR/META-INF/jboss-ejb3.xml"
file usages the widlcard character * for declaring the clustered beans as following:
<?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>
- Is there a way to specify that certain beans can be excluded to be deployed as
Clustered
or is there any exclude tag available in the"jboss-ejb3.xml"
which can be usd to tell the JBoss EJB container to deploy rest of the Beans as clustered except certain Beans.
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.2.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.