Well, it should work.
I just tested it by adding the following line to one of the BeforeBeanDiscovery observers
Class.forName("com.ibm.test.deltaspiketccl.wara.base.TestServlet", true, Thread.currentThread().getContextClassLoader());
|
When I installed the ear file on WildFly I got a ClassNotFound exception. While it is true that EE.8.2.5 says that I should have a catch block that makes a second attempt to load the Class without mentioning the TCCL. I'm not sure that this means that the requirement mentioned in EE.6.2.3.7, that the TCCL can load classes is lifted. It seems to me that the correct interpretation of the two sections in combinations is that class loading using the TCCL should work; but you should have a fallback option regardless. But under what circumstances will the TCCL be able to load classes during BeforeBeanDiscovery for an EAR with multiple WAR files on Wildfly? |