Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 43866 invoked from network); 10 Jun 2008 12:27:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jun 2008 12:27:36 -0000 Received: (qmail 8187 invoked by uid 500); 10 Jun 2008 12:27:38 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 8137 invoked by uid 500); 10 Jun 2008 12:27:38 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 8128 invoked by uid 99); 10 Jun 2008 12:27:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2008 05:27:38 -0700 X-ASF-Spam-Status: No, hits=-1999.8 required=10.0 tests=ALL_TRUSTED,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2008 12:26:49 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8FB2C23889C1; Tue, 10 Jun 2008 05:27:07 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@cxf.apache.org From: bharath@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080610122707.8FB2C23889C1@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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;