cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1073319 - in /cxf/trunk/rt/transports: http-osgi/src/main/resources/META-INF/spring/cxf-transport-osgi.xml http/src/main/java/org/apache/cxf/transport/servlet/AbstractServletController.java
Date Tue, 22 Feb 2011 12:49:18 GMT
Author: ningjiang
Date: Tue Feb 22 12:49:18 2011
New Revision: 1073319

URL: http://svn.apache.org/viewvc?rev=1073319&view=rev
Log:
CXF-3355 Exporting the properties of OSGi transport Servlet for configuring by the OSGi admin
services

Modified:
    cxf/trunk/rt/transports/http-osgi/src/main/resources/META-INF/spring/cxf-transport-osgi.xml
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractServletController.java

Modified: cxf/trunk/rt/transports/http-osgi/src/main/resources/META-INF/spring/cxf-transport-osgi.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-osgi/src/main/resources/META-INF/spring/cxf-transport-osgi.xml?rev=1073319&r1=1073318&r2=1073319&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-osgi/src/main/resources/META-INF/spring/cxf-transport-osgi.xml
(original)
+++ cxf/trunk/rt/transports/http-osgi/src/main/resources/META-INF/spring/cxf-transport-osgi.xml
Tue Feb 22 12:49:18 2011
@@ -31,6 +31,14 @@ http://www.springframework.org/schema/co
     <osgix:cm-properties id="cxfOsgiProperties" persistent-id="org.apache.cxf.osgi">
         <prop key="org.apache.cxf.servlet.context">/cxf</prop>
         <prop key="org.apache.cxf.servlet.name">cxf-osgi-transport-servlet</prop>
+        <prop key="org.apache.cxf.servlet.hide-service-list-page">false</prop>
+        <prop key="org.apache.cxf.servlet.disable-address-updates">false</prop>
+        <prop key="org.apache.cxf.servlet.base-address"></prop>
+        <prop key="org.apache.cxf.servlet.service-list-path"></prop>
+        <prop key="org.apache.cxf.servlet.static-resources-list"></prop>
+        <prop key="org.apache.cxf.servlet.redirects-list"></prop>
+        <prop key="org.apache.cxf.servlet.redirect-servlet-name"></prop>
+        <prop key="org.apache.cxf.servlet.redirect-servlet-path"></prop>
     </osgix:cm-properties>
 
     <ctx:property-placeholder properties-ref="cxfOsgiProperties"/>
@@ -45,6 +53,14 @@ http://www.springframework.org/schema/co
         <osgi:service-properties>
             <entry key="alias" value="${org.apache.cxf.servlet.context}" />
             <entry key="servlet-name" value="${org.apache.cxf.servlet.name}"/>
+            <entry key="hide-service-list-page" value="${org.apache.cxf.servlet.hide-service-list-page}"/>
+            <entry key="disable-address-updates" value="${org.apache.cxf.servlet.disable-address-updates}"/>
+            <entry key="base-address" value="${org.apache.cxf.servlet.base-address}"/>
+            <entry key="service-list-path" value="${org.apache.cxf.servlet.service-list-path}"/>
+            <entry key="static-resources-list" value="${org.apache.cxf.servlet.static-resources-list}"/>
+            <entry key="redirects-list" value="${org.apache.cxf.servlet.redirects-list}"/>
+            <entry key="redirect-servlet-name" value="${org.apache.cxf.servlet.redirect-servlet-name}"/>
+            <entry key="redirect-servlet-path" value="${org.apache.cxf.servlet.redirect-servlet-path}"/>
         </osgi:service-properties>
     </osgi:service>
 

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractServletController.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractServletController.java?rev=1073319&r1=1073318&r2=1073319&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractServletController.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractServletController.java
Tue Feb 22 12:49:18 2011
@@ -31,6 +31,7 @@ import javax.servlet.http.HttpServletReq
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.common.util.UrlUtils;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transport.http.AbstractHTTPDestination;
@@ -88,15 +89,15 @@ public abstract class AbstractServletCon
         }
         
         String hideServiceList = servletConfig.getInitParameter("hide-service-list-page");
-        if (hideServiceList != null) {
+        if (!StringUtils.isEmpty(hideServiceList)) {
             this.isHideServiceList = Boolean.valueOf(hideServiceList);
         }
         String isDisableAddressUpdates = servletConfig.getInitParameter("disable-address-updates");
-        if (isDisableAddressUpdates != null) {
+        if (!StringUtils.isEmpty(isDisableAddressUpdates)) {
             this.disableAddressUpdates = Boolean.valueOf(isDisableAddressUpdates);
         }
         String isForcedBaseAddress = servletConfig.getInitParameter("base-address");
-        if (isForcedBaseAddress != null) {
+        if (!StringUtils.isEmpty(isForcedBaseAddress)) {
             this.forcedBaseAddress = isForcedBaseAddress;
         }
         try {
@@ -105,7 +106,7 @@ public abstract class AbstractServletCon
             throw new RuntimeException(e.getMessage(), e);
         }
         String serviceListPath = servletConfig.getInitParameter("service-list-path");
-        if (serviceListPath != null) {
+        if (!StringUtils.isEmpty(serviceListPath)) {
             this.serviceListRelativePath = serviceListPath;
         }
     }



Mime
View raw message