servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1156463 - in /servicemix/smx3/trunk/distributions/apache-servicemix-web/src/main: java/org/apache/servicemix/web/cxf/ java/org/apache/servicemix/web/cxf/CXFManagedServlet.java webapp/WEB-INF/web.xml
Date Thu, 11 Aug 2011 03:44:17 GMT
Author: ffang
Date: Thu Aug 11 03:44:16 2011
New Revision: 1156463

URL: http://svn.apache.org/viewvc?rev=1156463&view=rev
Log:
[SM-2115]ensure cxf servlet transport and cxf bc can share same bus out of box when deploy
smx-cxf-bc in web container

Added:
    servicemix/smx3/trunk/distributions/apache-servicemix-web/src/main/java/org/apache/servicemix/web/cxf/
    servicemix/smx3/trunk/distributions/apache-servicemix-web/src/main/java/org/apache/servicemix/web/cxf/CXFManagedServlet.java
Modified:
    servicemix/smx3/trunk/distributions/apache-servicemix-web/src/main/webapp/WEB-INF/web.xml

Added: servicemix/smx3/trunk/distributions/apache-servicemix-web/src/main/java/org/apache/servicemix/web/cxf/CXFManagedServlet.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/distributions/apache-servicemix-web/src/main/java/org/apache/servicemix/web/cxf/CXFManagedServlet.java?rev=1156463&view=auto
==============================================================================
--- servicemix/smx3/trunk/distributions/apache-servicemix-web/src/main/java/org/apache/servicemix/web/cxf/CXFManagedServlet.java
(added)
+++ servicemix/smx3/trunk/distributions/apache-servicemix-web/src/main/java/org/apache/servicemix/web/cxf/CXFManagedServlet.java
Thu Aug 11 03:44:16 2011
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.servicemix.web.cxf;
+
+import javax.servlet.ServletConfig;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.transport.servlet.CXFNonSpringServlet;
+import org.apache.cxf.transport.servlet.ServletController;
+
+public class CXFManagedServlet extends CXFNonSpringServlet {
+
+    protected void loadBus(ServletConfig sc) {
+        setBus(BusFactory.newInstance().getDefaultBus());
+    }
+
+}

Modified: servicemix/smx3/trunk/distributions/apache-servicemix-web/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/distributions/apache-servicemix-web/src/main/webapp/WEB-INF/web.xml?rev=1156463&r1=1156462&r2=1156463&view=diff
==============================================================================
--- servicemix/smx3/trunk/distributions/apache-servicemix-web/src/main/webapp/WEB-INF/web.xml
(original)
+++ servicemix/smx3/trunk/distributions/apache-servicemix-web/src/main/webapp/WEB-INF/web.xml
Thu Aug 11 03:44:16 2011
@@ -108,12 +108,12 @@
       <description>Apache CXF Endpoint</description>
       <display-name>cxf</display-name> 
       <servlet-name>cxf</servlet-name>
-      <servlet-class>org.apache.cxf.transport.servlet.CXFNonSpringServlet</servlet-class>
+      <servlet-class>org.apache.servicemix.web.cxf.CXFManagedServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet-mapping>
       <servlet-name>cxf</servlet-name>
-      <url-pattern>/services/*</url-pattern>
+      <url-pattern>/cxfservices/*</url-pattern>
   </servlet-mapping>
 
 	  <welcome-file-list>



Mime
View raw message