User: jules_gosnell
Date: 01/10/03 15:27:02
Modified: jetty/src/main/org/jboss/jetty JBossLogSink.java
SetupHandler.java
Log:
sync with 2.4
Revision Changes Path
1.6 +3 -3 contrib/jetty/src/main/org/jboss/jetty/JBossLogSink.java
Index: JBossLogSink.java
===================================================================
RCS file: /cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/JBossLogSink.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- JBossLogSink.java 2001/09/16 17:14:17 1.5
+++ JBossLogSink.java 2001/10/03 22:27:02 1.6
@@ -5,7 +5,7 @@
* See terms of license at gnu.org.
*/
-// $Id: JBossLogSink.java,v 1.5 2001/09/16 17:14:17 jules_gosnell Exp $
+// $Id: JBossLogSink.java,v 1.6 2001/10/03 22:27:02 jules_gosnell Exp $
package org.jboss.jetty;
@@ -22,7 +22,7 @@
* This class bidges the API between Jetty and Log4J.
*
* @author <a href="mailto:">Jules Gosnell</a>
- * @version $Id: JBossLogSink.java,v 1.5 2001/09/16 17:14:17 jules_gosnell Exp $
+ * @version $Id: JBossLogSink.java,v 1.6 2001/10/03 22:27:02 jules_gosnell Exp $
* @since 1.0
* @see org.mortbay.util.LogSink
*/
@@ -41,7 +41,7 @@
// populate the dispatch map...
_dispatch.put(Log.DEBUG, new Logger(){public void log(String
s){_log.debug(s);}});
_dispatch.put(Log.EVENT, new Logger(){public void log(String
s){_log.info(s);}});
- _dispatch.put(Log.WARN, new Logger(){public void log(String
s){_log.warn(s);}});
+ _dispatch.put(Log.WARN, new Logger(){public void log(String
s){_log.warn("WARNING: "+s);}});
_dispatch.put(Log.ASSERT, new Logger(){public void log(String
s){_log.error(s);}});
_dispatch.put(Log.FAIL, new Logger(){public void log(String
s){_log.error(s);}});
}
1.10 +14 -5 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.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- SetupHandler.java 2001/09/16 17:14:17 1.9
+++ SetupHandler.java 2001/10/03 22:27:02 1.10
@@ -5,7 +5,7 @@
* See terms of license at gnu.org.
*/
-// $Id: SetupHandler.java,v 1.9 2001/09/16 17:14:17 jules_gosnell Exp $
+// $Id: SetupHandler.java,v 1.10 2001/10/03 22:27:02 jules_gosnell Exp $
package org.jboss.jetty;
@@ -13,7 +13,6 @@
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.9 $
+ * @version $Revision: 1.10 $
*/
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