Reporting my findings on the new ClassPoolTestCase:
-
http://anonsvn.jboss.org/repos/jbossas/projects/jboss-deployers/trunk/dep...
All the simple deployment tests pass,
it was the more hierarchy complex (if you can call .ear complex) that immediately failed
for me.
It appeared that the old ClassPool's ClassLoader was used:
| junit.framework.AssertionFailedError:
expected:<BaseClassLoader@135da43{vfs://top-level.ear/}> but
was:<BaseClassLoader@2cbc86{vfs://simple.jar/}>
| at
org.jboss.test.deployers.vfs.classpool.test.ClassPoolTest.assertClassPool(ClassPoolTest.java:83)
| at
org.jboss.test.deployers.vfs.classpool.test.ClassPoolTestCase.testBasicEar(ClassPoolTestCase.java:82)
Then I tied the RegisterModuleCallback with ClassLoading to properly track Module
creation/destruction.
| <bean name="RegisterModuleCallback"
class="org.jboss.classpool.plugins.as5.RegisterModuleCallback">
| <install method="addModuleRegistry" bean="ClassLoading"
whenRequired="Start">
| <parameter><this/></parameter>
| </install>
| <uninstall method="removeModuleRegistry"
bean="ClassLoading" whenRequired="Start">
| <parameter><this/></parameter>
| </uninstall>
| </bean>
|
This now looks like something simply snatches CL under the ClassPool:
| junit.framework.AssertionFailedError:
expected:<BaseClassLoader@bafdff{vfs://top-level.ear/}> but was:<null>
|
Also, the assertClassPool method doesn't look valid for all classes.
e.g. top deployment unit's classloader cannot see war's classes -->
AnyServlet.class in testBasicEar
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4260467#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...