From: remm Date: Thu, 30 Mar 2006 15:10:13 +0000 (+0000) Subject: - Standardize on the digester (which is apparently a bit faster than using DOM).... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ebec864cf807acbac97e80d3745c568be680dcf2;p=tomcat7.0 - Standardize on the digester (which is apparently a bit faster than using DOM). This way, digester now handles all XML parsing in Catalina. git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@390157 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/tomcat/util/modeler/Registry.java b/java/org/apache/tomcat/util/modeler/Registry.java index 92ddff20b..6fdf23cc5 100644 --- a/java/org/apache/tomcat/util/modeler/Registry.java +++ b/java/org/apache/tomcat/util/modeler/Registry.java @@ -773,7 +773,7 @@ public class Registry implements RegistryMBean, MBeanRegistration { } if( sourceType==null ) { - sourceType="MbeansDescriptorsDOMSource"; + sourceType="MbeansDescriptorsDigesterSource"; } ModelerSource ds=getModelerSource(sourceType); List mbeans=ds.loadDescriptors(this, location, type, inputsource); @@ -786,7 +786,7 @@ public class Registry implements RegistryMBean, MBeanRegistration { return "MbeansDescriptorsSerSource"; } else if( s.endsWith(".xml")) { - return "MbeansDescriptorsDOMSource"; + return "MbeansDescriptorsDigesterSource"; } return null; } @@ -866,7 +866,7 @@ public class Registry implements RegistryMBean, MBeanRegistration { searchedPaths.put( packageName, dURL ); try { if( descriptors.endsWith(".xml" )) - loadDescriptors("MbeansDescriptorsDOMSource", dURL, null); + loadDescriptors("MbeansDescriptorsDigesterSource", dURL, null); else loadDescriptors("MbeansDescriptorsSerSource", dURL, null); return; @@ -912,7 +912,7 @@ public class Registry implements RegistryMBean, MBeanRegistration { URL url=(URL)en.nextElement(); InputStream is=url.openStream(); if( log.isDebugEnabled()) log.debug("Loading " + url); - loadDescriptors("MBeansDescriptorDOMSource", is, null ); + loadDescriptors("MbeansDescriptorsDigesterSource", is, null ); } } catch( Exception ex ) { ex.printStackTrace(); @@ -957,7 +957,7 @@ public class Registry implements RegistryMBean, MBeanRegistration { private ModelerSource getModelerSource( String type ) throws Exception { - if( type==null ) type="MbeansDescriptorsDOMSource"; + if( type==null ) type="MbeansDescriptorsDigesterSource"; if( type.indexOf( ".") < 0 ) { type="org.apache.tomcat.util.modeler.modules." + type; } @@ -1031,7 +1031,7 @@ public class Registry implements RegistryMBean, MBeanRegistration { public void loadDescriptors( Object source ) throws Exception { - loadDescriptors("MbeansDescriptorsDOMSource", source, null ); + loadDescriptors("MbeansDescriptorsDigesterSource", source, null ); } /** @deprecated - may still be used in code using pre-1.1 builds