EJB annotation scanning does not work on deployment if there is an EJB2 dtd or schema definition in ejb-jar.xml
Issue
If META-INF/ejb-jar.xml with EJB2.1 schema or EJB 2.0 dtd is included in ejb-jar archive, @Stateless, @Stateful and @Singleton EJB3 annotations in that archive are not scanned on deployment. Can EJB2 and EJB3 be mixed in a single ejb-jar archive?
EJB2.1:
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
version="2.1">
...
</ejb-jar>
EJB2.0:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
...
</ejb-jar>
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7.4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.