cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhar...@apache.org
Subject svn commit: r666085 - /cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java
Date Tue, 10 Jun 2008 12:27:07 GMT
Author: bharath
Date: Tue Jun 10 05:27:07 2008
New Revision: 666085

URL: http://svn.apache.org/viewvc?rev=666085&view=rev
Log:
[CXF-1639] Fix for several memory leak issues. 
http://www.nabble.com/Memory-Leak-at-WSDLManagerImpl-td17579537.html

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java?rev=666085&r1=666084&r2=666085&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java Tue Jun
10 05:27:07 2008
@@ -19,6 +19,8 @@
 
 package org.apache.cxf.wsdl11;
 
+import java.io.File;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.Iterator;
 import java.util.List;
@@ -77,10 +79,18 @@
     public WSDLServiceFactory(Bus b, String url, QName sn) {
         setBus(b);
         try {
+            try {
+                wsdlUrl = new URL(url);
+            } catch (MalformedURLException e) {
+                wsdlUrl = new File(url).toURL();
+            }
             // use wsdl manager to parse wsdl or get cached definition
-            definition = getBus().getExtension(WSDLManager.class).getDefinition(url);
+            WSDLManager wsdlManager = getBus().getExtension(WSDLManager.class);
+            definition = wsdlManager.getDefinition(wsdlUrl);
         } catch (WSDLException ex) {
             throw new ServiceConstructionException(new Message("SERVICE_CREATION_MSG", LOG),
ex);
+        } catch (MalformedURLException ex) {
+            throw new ServiceConstructionException(new Message("SERVICE_CREATION_MSG", LOG),
ex);
         }
         
         serviceName = sn;



Mime
View raw message