Author: heiko.braun(a)jboss.com
Date: 2007-01-26 10:06:03 -0500 (Fri, 26 Jan 2007)
New Revision: 2138
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java
Log:
Use XMLGrammarPool when parsing XSD to improve deployment time
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java 2007-01-26
15:02:04 UTC (rev 2137)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java 2007-01-26
15:06:03 UTC (rev 2138)
@@ -47,6 +47,7 @@
import org.apache.xerces.xs.XSSimpleTypeDefinition;
import org.apache.xerces.xs.XSTerm;
import org.apache.xerces.xs.XSTypeDefinition;
+import org.apache.xerces.util.XMLGrammarPoolImpl;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.server.ServerConfig;
@@ -381,6 +382,7 @@
XMLSchemaLoader xsloader = new XMLSchemaLoader();
JBossXSErrorHandler eh = new JBossXSErrorHandler();
xsloader.setErrorHandler(eh);
+
xsloader.setProperty("http://apache.org/xml/properties/internal/gram...;,
new XMLGrammarPoolImpl());
return xsloader;
}
@@ -396,6 +398,7 @@
XMLSchemaLoader xsloader = new XMLSchemaLoader();
xsloader.setEntityResolver(xer);
xsloader.setErrorHandler(xeh);
+
xsloader.setProperty("http://apache.org/xml/properties/internal/gram...;,
new XMLGrammarPoolImpl());
return xsloader;
}