Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 38176 invoked from network); 2 May 2008 21:51:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 May 2008 21:51:06 -0000 Received: (qmail 24170 invoked by uid 500); 2 May 2008 21:51:07 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 24117 invoked by uid 500); 2 May 2008 21:51:07 -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 24106 invoked by uid 99); 2 May 2008 21:51:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2008 14:51:07 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED 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; Fri, 02 May 2008 21:50:31 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6B4F223889FD; Fri, 2 May 2008 14:50:45 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r652923 - in /cxf/branches/2.0.x-fixes: ./ api/src/main/java/org/apache/cxf/BusFactory.java rt/core/src/main/resources/META-INF/cxf/org.apache.cxf.bus.factory Date: Fri, 02 May 2008 21:50:45 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080502215045.6B4F223889FD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Fri May 2 14:50:45 2008 New Revision: 652923 URL: http://svn.apache.org/viewvc?rev=652923&view=rev Log: Merged revisions 652916 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r652916 | dkulp | 2008-05-02 17:13:58 -0400 (Fri, 02 May 2008) | 2 lines [CXF-1562] Allow grabbing factory via META-INF/cxf package ........ Added: cxf/branches/2.0.x-fixes/rt/core/src/main/resources/META-INF/cxf/org.apache.cxf.bus.factory - copied unchanged from r652916, cxf/trunk/rt/core/src/main/resources/META-INF/cxf/org.apache.cxf.bus.factory Modified: cxf/branches/2.0.x-fixes/ (props changed) cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java Propchange: cxf/branches/2.0.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java?rev=652923&r1=652922&r2=652923&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java (original) +++ cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java Fri May 2 14:50:45 2008 @@ -195,6 +195,21 @@ } else { is = classLoader.getResourceAsStream(serviceId); } + if (is == null) { + serviceId = "META-INF/cxf/" + BusFactory.BUS_FACTORY_PROPERTY_NAME; + + if (classLoader == null) { + classLoader = Thread.currentThread().getContextClassLoader(); + } + + if (classLoader == null) { + is = ClassLoader.getSystemResourceAsStream(serviceId); + } else { + is = classLoader.getResourceAsStream(serviceId); + } + } + + if (is != null) { BufferedReader rd = new BufferedReader(new InputStreamReader(is, "UTF-8")); busFactoryClass = rd.readLine(); @@ -228,3 +243,4 @@ } } + \ No newline at end of file