Author: dkulp
Date: Tue Sep  3 16:49:11 2013
New Revision: 1519753

URL: http://svn.apache.org/r1519753
Log:
Merged revisions 1519750 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

........
  r1519750 | dkulp | 2013-09-03 12:33:05 -0400 (Tue, 03 Sep 2013) | 10 lines

  Merged revisions 1519747 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/trunk

  ........
    r1519747 | dkulp | 2013-09-03 12:25:26 -0400 (Tue, 03 Sep 2013) | 2 lines

    Don't use the 3.0 only API if the 2.5.x version will work

  ........

........

Modified:
    
cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java

Modified: 
cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java?rev=1519753&r1=1519752&r2=1519753&view=diff
==============================================================================
--- 
cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java
 (original)
+++ 
cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java
 Tue Sep  3 16:49:11 2013
@@ -69,7 +69,10 @@ public class BusApplicationContextResour
         try {
             T resource = null;
             if (resourceName == null) {
-                resource = resourceType.cast(context.getBean(resourceType));
+                String names[] = context.getBeanNamesForType(resourceType);
+                if (names != null && names.length > 0) {
+                    resource = resourceType.cast(context.getBean(names[0], 
resourceType));
+                }
             } else {
                 resource = resourceType.cast(context.getBean(resourceName, 
resourceType));
             }


Reply via email to