cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r608731 - /incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/XMLUtils.java
Date Fri, 04 Jan 2008 03:43:39 GMT
Author: ffang
Date: Thu Jan  3 19:43:39 2008
New Revision: 608731

URL: http://svn.apache.org/viewvc?rev=608731&view=rev
Log:
[CXF-1351] add checking for parent classloader of context class loader to avoid generating
too much times parserFactory

Modified:
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/XMLUtils.java

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/XMLUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/XMLUtils.java?rev=608731&r1=608730&r2=608731&view=diff
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/XMLUtils.java (original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/XMLUtils.java Thu
Jan  3 19:43:39 2008
@@ -90,6 +90,8 @@
     public static DocumentBuilder getParser() throws ParserConfigurationException {
         if (parserFactory.getClass().getClassLoader() != null 
             && !parserFactory.getClass().getClassLoader().equals(
+                    Thread.currentThread().getContextClassLoader().getParent())    
+            && !parserFactory.getClass().getClassLoader().equals(
                 Thread.currentThread().getContextClassLoader())) {
             //not the same classloader which init parserFactory, so create parserFactory
with new classLoader
             parserFactory = DocumentBuilderFactory.newInstance();



Mime
View raw message