On Friday, September 09, 2011 11:59:19 PM Freeman Fang wrote: > Hi Dan, > > I still encounter <cxf:bus name=""> doesn't work with this commit. > You can reproduce by editing > rt/management/src/test/resources/managed-spring.xml > do change like > - <cxf:bus id="CXF-Test-Bus" bus="cxf"/> > + <cxf:bus id="CXF-Test-Bus" name="cxf" bus="cxf"/>
Ah. OK. Would not have expected bus and name to both be set. Should be fixed now I think. Dan > then run mvn test -Dtest=BusRegistrationTest, you can see the error like > testRegisterMultipleBuses > (org.apache.cxf.management.jmx.BusRegistrationTest): > org.springframework.beans.factory.BeanCreationException: Error > creating bean with name 'cxf.config': Initialization of bean failed; > nested exception is > org.springframework.beans.ConversionNotSupportedException: Failed to > convert property value of type > 'org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig' to required > type 'org.apache.cxf.Bus' for property 'bus'; nested exception is > java.lang.IllegalStateException: Cannot convert value of type > [org.apache.cxf.bus.spring.BusDefinitionParser$BusConfig] to required > type [org.apache.cxf.Bus] for property 'bus': no matching editors or > conversion strategy found > > Regards > Freeman > > On 2011-9-9, at 下午8:23, [email protected] wrote: > > Author: dkulp > > Date: Fri Sep 9 12:23:45 2011 > > New Revision: 1167126 > > > > URL: http://svn.apache.org/viewvc?rev=1167126&view=rev > > Log: > > Fix issue of using <cxf:bus name=""> causing problems in spring > > > > Modified: > > cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/ > > > > BusDefinitionParser.java > > > > 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=1167126&r1=1167125&r2=11671 > > 26&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 Fri Sep 9 12:23:45 2011 > > @@ -54,6 +54,10 @@ public class BusDefinitionParser extends > > > > String bus = element.getAttribute("bus"); > > if (StringUtils.isEmpty(bus)) { > > > > bus = element.getAttribute("name"); > > > > + if (StringUtils.isEmpty(bus)) { > > + element.setAttribute("bus", bus); > > + element.removeAttribute("name"); > > + } > > > > } > > if (StringUtils.isEmpty(bus)) { > > > > addBusWiringAttribute(bean, > > BusWiringType.PROPERTY); > > --------------------------------------------- > Freeman Fang > > FuseSource > Email:[email protected] > Web: fusesource.com > Twitter: freemanfang > Blog: http://freemanfang.blogspot.com -- Daniel Kulp [email protected] http://dankulp.com/blog Talend - http://www.talend.com
