cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r908779 - in /cxf/trunk/rt/core/src: main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java test/java/org/apache/cxf/bus/spring/customerBus.xml
Date Thu, 11 Feb 2010 01:06:13 GMT
Author: ningjiang
Date: Thu Feb 11 01:06:10 2010
New Revision: 908779

URL: http://svn.apache.org/viewvc?rev=908779&view=rev
Log:
CXF-2667 supporting not to specify the name attribute for bus configure

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
    cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/customerBus.xml

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java?rev=908779&r1=908778&r2=908779&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java Thu
Feb 11 01:06:10 2010
@@ -22,6 +22,7 @@
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import org.w3c.dom.Element;
 
@@ -43,6 +44,7 @@
 import org.springframework.context.ApplicationContextAware;
 
 public class BusDefinitionParser extends AbstractBeanDefinitionParser {
+    private static AtomicInteger counter = new AtomicInteger(0);
 
     public BusDefinitionParser() {
         super();
@@ -78,7 +80,7 @@
     protected String getIdOrName(Element elem) {
         String id = super.getIdOrName(elem); 
         if (StringUtils.isEmpty(id)) {
-            id = Bus.DEFAULT_BUS_ID + ".config";
+            id = Bus.DEFAULT_BUS_ID + ".config" + counter.getAndIncrement();
         }
         return id;
     }

Modified: cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/customerBus.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/customerBus.xml?rev=908779&r1=908778&r2=908779&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/customerBus.xml (original)
+++ cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/customerBus.xml Thu Feb 11 01:06:10
2010
@@ -28,13 +28,13 @@
    
   <bean id="cxf2" class="org.apache.cxf.bus.CXFBusImpl"/>
 
-   <cxf:bus name="test1" bus="cxf1">
+   <cxf:bus bus="cxf1">
         <cxf:outInterceptors>
         <bean id="logOutbound" class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
         </cxf:outInterceptors>
     </cxf:bus>
 
-    <cxf:bus name="test2" bus="cxf2">
+    <cxf:bus bus="cxf2">
         <cxf:inInterceptors>
         <bean id="logInbound" class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
         </cxf:inInterceptors>



Mime
View raw message