Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 52692 invoked from network); 10 Feb 2010 16:19:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Feb 2010 16:19:55 -0000 Received: (qmail 76197 invoked by uid 500); 10 Feb 2010 16:19:55 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 76127 invoked by uid 500); 10 Feb 2010 16:19:55 -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 76118 invoked by uid 99); 10 Feb 2010 16:19:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Feb 2010 16:19:55 +0000 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; Wed, 10 Feb 2010 16:19:53 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D5868238897F; Wed, 10 Feb 2010 16:19:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r908566 - in /cxf/branches/2.1.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/bus/spring/ rt/core/src/main/resources/schemas/ rt/core/src/test/java/org/apache/cxf/bus/spring/ Date: Wed, 10 Feb 2010 16:19:31 -0000 To: commits@cxf.apache.org From: ningjiang@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100210161931.D5868238897F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ningjiang Date: Wed Feb 10 16:19:31 2010 New Revision: 908566 URL: http://svn.apache.org/viewvc?rev=908566&view=rev Log: Merged revisions 908559 via svnmerge from https://svn.apache.org/repos/asf/cxf/branches/2.2.x-fixes ................ r908559 | ningjiang | 2010-02-11 00:05:38 +0800 (Thu, 11 Feb 2010) | 9 lines Merged revisions 908549 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r908549 | ningjiang | 2010-02-10 23:46:51 +0800 (Wed, 10 Feb 2010) | 1 line CXF-2667 bus configure should provides bus attribute to set the bus ........ ................ Added: cxf/branches/2.1.x-fixes/rt/core/src/test/java/org/apache/cxf/bus/spring/customerBus.xml - copied unchanged from r908559, cxf/branches/2.2.x-fixes/rt/core/src/test/java/org/apache/cxf/bus/spring/customerBus.xml Modified: cxf/branches/2.1.x-fixes/ (props changed) cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java cxf/branches/2.1.x-fixes/rt/core/src/main/resources/schemas/core.xsd cxf/branches/2.1.x-fixes/rt/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java Propchange: cxf/branches/2.1.x-fixes/ ------------------------------------------------------------------------------ --- svn:mergeinfo (added) +++ svn:mergeinfo Wed Feb 10 16:19:31 2010 @@ -0,0 +1,2 @@ +/cxf/branches/2.2.x-fixes:908559 +/cxf/trunk:908549 Propchange: cxf/branches/2.1.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java?rev=908566&r1=908565&r2=908566&view=diff ============================================================================== --- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java (original) +++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java Wed Feb 10 16:19:31 2010 @@ -47,11 +47,12 @@ setBeanClass(BusConfig.class); } protected void doParse(Element element, ParserContext ctx, BeanDefinitionBuilder bean) { - String bus = element.getAttribute("bus"); + String bus = element.getAttribute("bus"); if (StringUtils.isEmpty(bus)) { addBusWiringAttribute(bean, BusWiringType.CONSTRUCTOR); } else { bean.addConstructorArgReference(bus); + element.removeAttribute("bus"); } super.doParse(element, ctx, bean); } Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/resources/schemas/core.xsd URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/resources/schemas/core.xsd?rev=908566&r1=908565&r2=908566&view=diff ============================================================================== --- cxf/branches/2.1.x-fixes/rt/core/src/main/resources/schemas/core.xsd (original) +++ cxf/branches/2.1.x-fixes/rt/core/src/main/resources/schemas/core.xsd Wed Feb 10 16:19:31 2010 @@ -116,7 +116,8 @@ - + + Modified: cxf/branches/2.1.x-fixes/rt/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java?rev=908566&r1=908565&r2=908566&view=diff ============================================================================== --- cxf/branches/2.1.x-fixes/rt/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java (original) +++ cxf/branches/2.1.x-fixes/rt/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java Wed Feb 10 16:19:31 2010 @@ -32,6 +32,8 @@ import org.junit.Assert; import org.junit.Test; +import org.springframework.context.support.ClassPathXmlApplicationContext; + public class BusDefinitionParserTest extends Assert { @Test @@ -63,6 +65,26 @@ assertTrue("bean injected into test feature has not been initialised", tf.testBean.initialised); } + @Test + public void testBusConfigure() { + ClassPathXmlApplicationContext context = null; + try { + context = new ClassPathXmlApplicationContext("org/apache/cxf/bus/spring/customerBus.xml"); + Bus cxf1 = (Bus)context.getBean("cxf1"); + + assertTrue(cxf1.getOutInterceptors().size() == 1); + assertTrue(cxf1.getInInterceptors().size() == 0); + + Bus cxf2 = (Bus)context.getBean("cxf2"); + assertTrue(cxf2.getInInterceptors().size() == 1); + assertTrue(cxf2.getOutInterceptors().size() == 0); + } finally { + if (context != null) { + context.close(); + } + } + } + static class TestBean { boolean initialised;