Author: ningjiang
Date: Thu Feb 11 05:21:43 2010
New Revision: 908843
URL: http://svn.apache.org/viewvc?rev=908843&view=rev
Log:
Merged revisions 908779 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r908779 | ningjiang | 2010-02-11 09:06:10 +0800 (Thu, 11 Feb 2010) | 1 line
CXF-2667 supporting not to specify the name attribute for bus configure
........
Modified:
cxf/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
cxf/branches/2.2.x-fixes/rt/core/src/test/java/org/apache/cxf/bus/spring/customerBus.xml
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 11 05:21:43 2010
@@ -1 +1 @@
-/cxf/trunk:908638
+/cxf/trunk:908638,908779
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java?rev=908843&r1=908842&r2=908843&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
(original)
+++
cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
Thu Feb 11 05:21:43 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;
@@ -41,6 +42,7 @@
import org.springframework.context.ApplicationContextAware;
public class BusDefinitionParser extends AbstractBeanDefinitionParser {
+ private static AtomicInteger counter = new AtomicInteger(0);
public BusDefinitionParser() {
super();
@@ -76,7 +78,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/branches/2.2.x-fixes/rt/core/src/test/java/org/apache/cxf/bus/spring/customerBus.xml
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/core/src/test/java/org/apache/cxf/bus/spring/customerBus.xml?rev=908843&r1=908842&r2=908843&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/rt/core/src/test/java/org/apache/cxf/bus/spring/customerBus.xml
(original)
+++
cxf/branches/2.2.x-fixes/rt/core/src/test/java/org/apache/cxf/bus/spring/customerBus.xml
Thu Feb 11 05:21:43 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>