Author: cziegeler Date: Tue Oct 26 11:11:37 2004 New Revision: 55628 Removed: cocoon/trunk/src/confpatch/enable-instrumentation.xweb cocoon/trunk/src/webapp/WEB-INF/instrumentation.xconf cocoon/trunk/tools/targets/instrumentation-build.xml Modified: cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java cocoon/trunk/src/webapp/WEB-INF/web.xml Log: Remove instrumentation support
Modified: cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java ============================================================================== --- cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java (original) +++ cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java Tue Oct 26 11:11:37 2004 @@ -48,8 +48,6 @@ import org.apache.commons.lang.BooleanUtils; import org.apache.commons.lang.SystemUtils; -import org.apache.excalibur.instrument.InstrumentManager; -import org.apache.excalibur.instrument.manager.DefaultInstrumentManager; import org.apache.log.ContextMap; import org.apache.log.ErrorHandler; import org.apache.log.Hierarchy; @@ -203,16 +201,6 @@ private boolean manageExceptions; /** - * Flag to enable avalon excalibur instrumentation of Cocoon. - */ - private boolean enableInstrumentation; - - /** - * The <code>InstrumentManager</code> instance - */ - private DefaultInstrumentManager instrumentManager; - - /** * This is the path to the servlet context (or the result * of calling getRealPath('/') on the ServletContext. * Note, that this can be null. @@ -468,8 +456,6 @@ this.manageExceptions = getInitParameterAsBoolean("manage-exceptions", true); - this.enableInstrumentation = getInitParameterAsBoolean("enable-instrumentation", false); - this.requestFactory = new RequestFactory(this.autoSaveUploads, this.uploadDir, this.allowOverwrite, @@ -499,10 +485,6 @@ this.disposeCocoon(); } - if (this.enableInstrumentation) { - this.instrumentManager.dispose(); - } - ContainerUtil.dispose( this.parentServiceManager ); } @@ -1399,40 +1381,6 @@ protected void updateEnvironment() throws ServletException { this.appContext.put(Constants.CONTEXT_CLASS_LOADER, classLoader); this.appContext.put(Constants.CONTEXT_CLASSPATH, getClassPath()); - } - - /** - * Helper method to obtain an <code>InstrumentManager</code> instance - * - * @return an <code>InstrumentManager</code> instance - */ - private InstrumentManager getInstrumentManager() - throws Exception { - String imConfig = getInitParameter("instrumentation-config"); - if (imConfig == null) { - throw new ServletException("Please define the init-param 'instrumentation-config' in your web.xml"); - } - - final InputStream is = this.servletContext.getResourceAsStream(imConfig); - final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(); - final Configuration conf = builder.build(is); - - // Get the logger for the instrument manager - final String imLoggerCategory = conf.getAttribute("logger", "core.instrument"); - Logger imLogger = this.loggerManager.getLoggerForCategory(imLoggerCategory); - - // Set up the Instrument Manager - DefaultInstrumentManager instrumentManager = new DefaultInstrumentManager(); - instrumentManager.enableLogging(imLogger); - instrumentManager.configure(conf); - instrumentManager.initialize(); - - if (getLogger().isDebugEnabled()) { - getLogger().debug("Instrument manager created " + instrumentManager); - } - - this.instrumentManager = instrumentManager; - return instrumentManager; } private String processTime(long time) { Modified: cocoon/trunk/src/webapp/WEB-INF/web.xml ============================================================================== --- cocoon/trunk/src/webapp/WEB-INF/web.xml (original) +++ cocoon/trunk/src/webapp/WEB-INF/web.xml Tue Oct 26 11:11:37 2004 @@ -321,24 +321,6 @@ </init-param> <!-- - If true, Avalon Excalibur instrumentation will be enabled on all - Instrumentable components with Cocoon and your Cocoon application. - --> - <init-param> - <param-name>enable-instrumentation</param-name> - <param-value>false</param-value> - </init-param> - - <!-- - This defines the location of the instrument manager configuration, only - used if the init-param enable-instrumentation is enabled. - --> - <init-param> - <param-name>instrumentation-config</param-name> - <param-value>/WEB-INF/instrumentation.xconf</param-value> - </init-param> - - <!-- Set encoding used by the container. If not set the ISO-8859-1 encoding will be assumed. Since the servlet specification requires that the ISO-8859-1 encoding