Ok, here is the issue and its rather simple, and in fact JBoss/Jetty
integration
has always been broken. It only started showing up in 2.4.1 because that
release had a bug fix for a JBossNS problem that allowed createSubContext
operations to silently overwrite existing contexts.
This problem will happen with any ear that contains more than one war.
The issue is that the Jetty does not create a seperate class loader for
each web application context it deploys. By this I mean the value for loader
obtained in the following is always the same as the JBoss class loader
that was set as the thread context class loader prior to calling
AbstractWebContainer.deploy.

package org.jboss.jetty;

public class SetupHandler
  extends NullHandler
{
  public void
    start()
    throws Exception
  {
    ClassLoader loader = getHandlerContext().getClassLoader();
    ...
   }
}

I'm not sure you want that, so that is a question for Greg. This would allow
sharing of classes and resources across web applications that should not be
allowed I believe. If in fact this is the desired behavior, the fix would be
to simply
have the AbstractWebContainer create a class loader for each war it deploys.
With
the change that allows child class loaders to access their parent java:comp
context this might be preferable even with Tomcat as the ENC could be
created before starting the war context. This would avoid the precarious
integration at just the right point in the war context lifecycle that is
required
with Tomcat currently.

I'm going to look into that, and if I add it, Jetty will just be fixed
without
any changes to its current integration. I would check with Greg to see if
the current class loader behavior is as expected.

A side note is that I'm moving the Tomcat service classes to subpackages
under org.jboss.web so that this is the top level log4j category for coarse
grained filtering of web msgs. The Jetty service should move under there as
well the next time its code is changed.




_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to