If there is a parent classloader instead of null, then Tomcat will find out that it's still in one of its classloader and so it will authorize the access to the JNDI context under java:comp
If that's the case (and it sounds like it is), Tomcat is making some unfortunate assumptions. What's probably happening is that Tomcat is looking for its own version of TCCL and, after seeing our swapped-out version, assumes "something bad happened".
EM bootstrapping taking over TCCL is definitely a bad thing and was necessary purely due to bad design within ORM. However, we've already corrected this and its no longer necessary in ORM 5.
But, until then, we still have to swap out the TCCL. And the super( null ); is necessary in AggregatedClassLoader's ctor to protect against accidentally grabbing a class/resource from the parent into our CL. For 4.3, we might need to introduce yet another ClassLoader impl that utilizes AggregateClassLoader, but allows the parent to be set. Again, horribly messy, but temporary.
|