User: jules_gosnell Date: 01/11/27 17:22:25 Modified: jetty/src/main/org/jboss/jetty JBossWebApplicationContext.java Jetty.java JettyService.java Log: messing around with DebugMBean stuff trying to get jetty.xml read out of jetty-plugin.sar ... Revision Changes Path 1.4 +17 -18 contrib/jetty/src/main/org/jboss/jetty/JBossWebApplicationContext.java Index: JBossWebApplicationContext.java =================================================================== RCS file: /cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/JBossWebApplicationContext.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- JBossWebApplicationContext.java 2001/11/25 14:52:48 1.3 +++ JBossWebApplicationContext.java 2001/11/28 01:22:25 1.4 @@ -5,7 +5,7 @@ * See terms of license at gnu.org. */ -// $Id: JBossWebApplicationContext.java,v 1.3 2001/11/25 14:52:48 jules_gosnell Exp $ +// $Id: JBossWebApplicationContext.java,v 1.4 2001/11/28 01:22:25 jules_gosnell Exp $ // A Jetty HttpServer with the interface expected by JBoss' // J2EEDeployer... @@ -135,7 +135,6 @@ } } - /** * return the first JBossSXSecurityHandler, inserting one at the * beginning of the list, if no other can be found. @@ -173,31 +172,31 @@ super.initWebXmlElement(element, node); } -// public boolean -// handle(org.mortbay.http.HttpRequest request, org.mortbay.http.HttpResponse response) -// throws org.mortbay.http.HttpException, java.io.IOException -// { -// Thread.currentThread().setContextClassLoader(getClassLoader()); -// return super.handle(request, response); -// } + // public boolean + // handle(org.mortbay.http.HttpRequest request, org.mortbay.http.HttpResponse response) + // throws org.mortbay.http.HttpException, java.io.IOException + // { + // Thread.currentThread().setContextClassLoader(getClassLoader()); + // return super.handle(request, response); + // } // hack our class loader to be Java2 compliant - i.e. always // delegate upwards before looking locally. This will be changed to // a non-compliant strategy later when JBoss' new ClassLoader is // ready. - protected void initClassLoader() - throws java.net.MalformedURLException, java.io.IOException - { - super.initClassLoader(); + protected void initClassLoader() + throws java.net.MalformedURLException, java.io.IOException + { + super.initClassLoader(); - ClassLoader _loader=getClassLoader(); - if (_loader instanceof org.mortbay.http.ContextLoader) + ClassLoader _loader=getClassLoader(); + if (_loader instanceof org.mortbay.http.ContextLoader) ((org.mortbay.http.ContextLoader)_loader).setJava2Compliant(true); - } + } - // copy our superclass' version of this, but ensure that servlet - // api and jasper jars are appended to it... + // copy our superclass' version of this, but ensure that servlet + // api and jasper jars are appended to it... public String getFileClassPath() throws IllegalStateException 1.22 +5 -1 contrib/jetty/src/main/org/jboss/jetty/Jetty.java Index: Jetty.java =================================================================== RCS file: /cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/Jetty.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- Jetty.java 2001/11/26 03:24:53 1.21 +++ Jetty.java 2001/11/28 01:22:25 1.22 @@ -5,7 +5,7 @@ * See terms of license at gnu.org. */ -// $Id: Jetty.java,v 1.21 2001/11/26 03:24:53 starksm Exp $ +// $Id: Jetty.java,v 1.22 2001/11/28 01:22:25 jules_gosnell Exp $ // A Jetty HttpServer with the interface expected by JBoss' // J2EEDeployer... @@ -119,9 +119,13 @@ if (configUrl==null) return; + _log.info("CONFIG IS: "+configUrl); + _log.info("CONFIG IS: "+findResourceInJar(configUrl)); + try { _log.info("loading config: "+configUrl); + // configure(findResourceInJar(configUrl).toString()); configure(configUrl); _log.info("loaded config: "+configUrl); _configuration=configUrl; 1.32 +18 -3 contrib/jetty/src/main/org/jboss/jetty/JettyService.java Index: JettyService.java =================================================================== RCS file: /cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/JettyService.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- JettyService.java 2001/11/26 23:39:22 1.31 +++ JettyService.java 2001/11/28 01:22:25 1.32 @@ -5,7 +5,7 @@ * See terms of license at gnu.org. */ -// $Id: JettyService.java,v 1.31 2001/11/26 23:39:22 jules_gosnell Exp $ +// $Id: JettyService.java,v 1.32 2001/11/28 01:22:25 jules_gosnell Exp $ package org.jboss.jetty; @@ -21,12 +21,14 @@ import org.jboss.web.WebApplication; import org.mortbay.util.Log; +import org.mortbay.jetty.jmx.DebugMBean; + /** * A service to launch jetty from JMX. * * @see <related> * @author <a href="mailto:[EMAIL PROTECTED]">Julian Gosnell</a> - * @version $Revision: 1.31 $ + * @version $Revision: 1.32 $ */ // NOTES @@ -42,6 +44,7 @@ Category _log = Category.getInstance(getClass().getName()); JettyMBean _mbean = null; + DebugMBean _debug = null; Jetty _jetty = null; MBeanServer _server = null; @@ -119,6 +122,8 @@ protected void ensureJetty() { + org.mortbay.jetty.jmx.ModelMBeanImpl.setJettyDomain("Jetty"); + // make a Jetty... Jetty tmp = new Jetty(_log); // tmp - until we have initialised it... tmp.setJettyHome(getJettyHome()); @@ -141,8 +146,9 @@ { _log.info("MBean peers WILL be created for Jetty Contexts"); _mbean = new JettyMBean(_jetty); + _debug = new DebugMBean(); _server.registerMBean(_mbean, new ObjectName(_mbean.newObjectName(_server))); - _log.info(_mbean.newObjectName(_server)); + _server.registerMBean(_debug, new ObjectName("Jetty:Jetty=Debug")); } catch (Throwable e) { @@ -232,6 +238,15 @@ _jetty.destroy(); _jetty=null; _mbean=null; + try + { + _server.unregisterMBean(new ObjectName("Jetty:Jetty=Debug")); + } + catch(Exception e) + { + _log.error("problem unregistering DebugMBean", e); + } + _debug=null; } else _log.warn("WARNING: Jetty has already been destroyed");
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development