cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1564734 - /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java
Date Wed, 05 Feb 2014 12:21:38 GMT
Author: sergeyb
Date: Wed Feb  5 12:21:37 2014
New Revision: 1564734

URL: http://svn.apache.org/r1564734
Log:
[CXF-5541] Adding a 'bus' parameter to CXFServlet

Modified:
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java?rev=1564734&r1=1564733&r2=1564734&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java
Wed Feb  5 12:21:37 2014
@@ -41,6 +41,8 @@ import org.springframework.web.context.s
 public class CXFServlet extends CXFNonSpringServlet
     implements ApplicationListener<ContextRefreshedEvent> {
     private static final long serialVersionUID = -5922443981969455305L;
+    private static final String BUS_PARAMETER = "bus";
+    
     private boolean busCreated;
     private XmlWebApplicationContext createdContext; 
     
@@ -72,7 +74,10 @@ public class CXFServlet extends CXFNonSp
             wac = createSpringContext(wac, servletConfig, configLocation);
         }
         if (wac != null) {
-            setBus((Bus)wac.getBean("cxf", Bus.class));
+            String busParam = servletConfig.getInitParameter(BUS_PARAMETER);
+            String busName = busParam == null ? "cxf" : busParam.trim();
+            
+            setBus((Bus)wac.getBean(busName, Bus.class));
         } else {
             busCreated = true;
             setBus(BusFactory.newInstance().createBus());



Mime
View raw message