Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0.2
-
None
Description
Preface
Although deltaspike-cdictrl was designed for "SE setups", ContextControl can be used in an enterprise CDI container like WELD on JBoss/Wildfly just fine. CdiControl cannot be used.
Problem
Even when you do not use CdiControl, enterprise WELD will at least log ClassNotFoundException regarding org.jboss.weld.environment.se.Weld when deltaspike-cdictrl-weld is deployed.
In WAR-deployments you might be able to exclude WeldContainerControl via beans.xml but with EAR-deployments you are out of luck.
Solution
- Either exclude WeldContainerControl (is created via ServiceLoader anyway):
deltaspike-cdictrl-weld/META-INF/beans.xml
<weld:exclude name="org.apache.deltaspike.cdise.weld.WeldContainerControl"/>
PS: Not sure whether @Typed() would work as well?
- Or provide a second assembly of deltaspike-cdictrl-weld with some classifer like "ctxctrl-only" which does not include the CdiControl stuff
I think the beans.xml-approach is the better solution.
Workaround
Custom re-packing/shading of deltaspike-cdictrl-weld and possibly also deltaspike-cdictrl-api. Very cumbersome...