How do I prevent EJB3 annotation scanning of jars in JBoss EAP?
Environment
JBoss Enterprise Application Platform (EAP) 5.0.0_GA
Issue
-
To improve deployment time we want to avoid EJB3 annotation of some jars in our ear.
-
We have application deploy in JBoss EAP4.3 today and we used to make the following changes in the
$JBOSS_HOME/server/$CONFIG/deploy/ejb3.deployer/META-INF/jboss-service.xmlto avoid an error:<mbean code="org.jboss.ejb3.JarsIgnoredForScanning" name="jboss.ejb3:service=JarsIgnoredForScanning"> <attribute name="IgnoredJars"> ... somejar.jar </attribute> </mbean>
Under JBoss EAP5, I don't see jboss-service.xml available anymore inside ejb3.deployer and how can I make the same configuration changes to avoid the error?
Resolution
The equivalent configurition is now located in $JBOSS_HOME/server/$CONFIG/deployers/ejb3.deployer/META-INF/ejb3-deployers-jboss-beans.xml. In this file, the Ejb3Deployer bean has a property named ignoredJarSets which is the equivalent setting to the IgnoredJars attribute of the jboss.ejb3:service=JarsIgnoredForScanning mbean in the EAP 4.x $JBOSS_HOME/server/$CONFIG/deploy/ejb3.deployer/META-INF/jboss-service.xml file.
So, the equivalent xml to the example above is:
...
<property name="ignoredJarsSet">
<set elementClass="java.lang.String">
<value>somejar.jar</value> ...
</set></property>...
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.