User: jules_gosnell
  Date: 01/10/03 14:55:53

  Modified:    jetty/src/main/org/jboss/jetty Tag: Branch_2_4
                        SetupHandler.java
  Log:
  a few more minor changes for the latest release
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.3   +15 -6     contrib/jetty/src/main/org/jboss/jetty/SetupHandler.java
  
  Index: SetupHandler.java
  ===================================================================
  RCS file: /cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/SetupHandler.java,v
  retrieving revision 1.4.2.2
  retrieving revision 1.4.2.3
  diff -u -r1.4.2.2 -r1.4.2.3
  --- SetupHandler.java 2001/09/17 23:10:57     1.4.2.2
  +++ SetupHandler.java 2001/10/03 21:55:53     1.4.2.3
  @@ -5,15 +5,14 @@
    * See terms of license at gnu.org.
    */
    
  -// $Id: SetupHandler.java,v 1.4.2.2 2001/09/17 23:10:57 jules_gosnell Exp $
  - 
  +// $Id: SetupHandler.java,v 1.4.2.3 2001/10/03 21:55:53 jules_gosnell Exp $
  +
   package org.jboss.jetty;
   
   import java.io.IOException;
   import org.apache.log4j.Category;
   import org.jboss.web.AbstractWebContainer.WebDescriptorParser;
   import org.jboss.web.WebApplication;
  -import org.mortbay.http.HandlerContext;
   import org.mortbay.http.HttpException;
   import org.mortbay.http.HttpRequest;
   import org.mortbay.http.HttpResponse;
  @@ -26,7 +25,7 @@
    * so that is sees the correct class loader and security realm name.
    *
    * @author  [EMAIL PROTECTED]
  - * @version $Revision: 1.4.2.2 $
  + * @version $Revision: 1.4.2.3 $
    */
   public class SetupHandler
     extends NullHandler
  @@ -54,8 +53,18 @@
       throws Exception
     {
       ClassLoader loader = getHandlerContext().getClassLoader();
  -    if (_webApp.getClassLoader()!=loader.getParent())
  -      _log.warn("WebApp ClassLoader is not child of J2EEDeployer's ClassLoader");
  +
  +    // sanity check - the classloader with which we are called
  +    // (i.e. the one that Jetty has used for the webapps context)
  +    // should be either the one we specified, or a descendent of it.
  +    {
  +      ClassLoader cl = loader;
  +      while (cl!=null && cl!=_webApp.getClassLoader())
  +     cl=cl.getParent();
  +      
  +      if (cl==null)
  +     _log.warn("WebApp Context's ClassLoader is of incorrect descent:"+loader);
  +    }
       
       // Setup the JNDI environment
       Element webAppDD = _webApp.getWebApp();
  
  
  

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

Reply via email to