cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r727784 - in /cxf/branches/2.1.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ rt/frontend/jaxrs/src/main...
Date Thu, 18 Dec 2008 18:28:31 GMT
Author: sergeyb
Date: Thu Dec 18 10:28:30 2008
New Revision: 727784

URL: http://svn.apache.org/viewvc?rev=727784&view=rev
Log:
Merged revisions 727096 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r727096 | sergeyb | 2008-12-16 17:35:19 +0000 (Tue, 16 Dec 2008) | 1 line
  
  JAXRS : ServletConfig injection, enhancing MessageContext 
........

Added:
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ProvidersImpl.java
      - copied, changed from r727096, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ProvidersImpl.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalProviders.java
      - copied, changed from r727096, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalProviders.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalServletConfig.java
      - copied unchanged from r727096, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalServletConfig.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/
      - copied from r727096, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/MessageContextImplTest.java
      - copied, changed from r727096, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/MessageContextImplTest.java
Removed:
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MessageBodyWorkersImpl.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalMessageBodyWorkers.java
Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContext.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalMessageContext.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
    cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
    cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractCXFServlet.java
    cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
    cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java
    cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/BookServerSecuritySpringClass.java
    cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/BookServerSecuritySpringInterface.java
    cxf/branches/2.1.x-fixes/systests/src/test/resources/jaxrs_security_no_annotations/WEB-INF/beans.xml

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec 18 10:28:30 2008
@@ -1 +1 @@
-/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691338,691355,691488,691602,691646,691706,691728,692116,692157,692310,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694795,694869,694981,694987,694993,695041,695096,695396,695484,695537,695552,695561,695619,695684,695835,695840,695868,695935,695977,696016,696094,696433,696720,697085,697868,698128,699289,700261,700507,700602,700981,701316,701783,701830,701862,702187,702205-702248,702267,702547,702561,702580,702602,702609,702616,702653,702656,702957,703191,703239,703309,703501,703513,703548,704584,704937,704997,705150,705235,705274,705340,705446,705548,705614,705692,705708,706482,706631,706675,706900,706909,707034,707089,707100,707902,708035,708044,708074,708410,708417,708550,708554,709353-709354,709425,710076,710150,71015
 4,711193,711388,711410,711490,711635,711949,711975,712194,712198,712238,712272,712299,712312,712670,712893,713082,713095-713096,713099,713584,713597,713737,713804,713899,714167-714168,714245,714255,717937-717961,718281-718448,718565,718620,718640,718665,718970,719017,719210,719215-719218,719222-719273,719305,719327-719680,720053,720119-720218,720238,720293-720316,720497,721221,721241,721501,722117,722129,722412,722988,723024,723338,723378,723716-723791,724333-724372,724433-724438,724449,724481,724485,724668,724780,724782,724785,724793,724795,724940,725071,725316,725332,725335,725348,725364,725418,725425-725426,725455,725506,725554,725562,725651,725671,725688,725754,725773,725799,725839,726342,726524,726631,726634,726637,726639,726692,726724,726992
+/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691338,691355,691488,691602,691646,691706,691728,692116,692157,692310,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694795,694869,694981,694987,694993,695041,695096,695396,695484,695537,695552,695561,695619,695684,695835,695840,695868,695935,695977,696016,696094,696433,696720,697085,697868,698128,699289,700261,700507,700602,700981,701316,701783,701830,701862,702187,702205-702248,702267,702547,702561,702580,702602,702609,702616,702653,702656,702957,703191,703239,703309,703501,703513,703548,704584,704937,704997,705150,705235,705274,705340,705446,705548,705614,705692,705708,706482,706631,706675,706900,706909,707034,707089,707100,707902,708035,708044,708074,708410,708417,708550,708554,709353-709354,709425,710076,710150,71015
 4,711193,711388,711410,711490,711635,711949,711975,712194,712198,712238,712272,712299,712312,712670,712893,713082,713095-713096,713099,713584,713597,713737,713804,713899,714167-714168,714245,714255,717937-717961,718281-718448,718565,718620,718640,718665,718970,719017,719210,719215-719218,719222-719273,719305,719327-719680,720053,720119-720218,720238,720293-720316,720497,721221,721241,721501,722117,722129,722412,722988,723024,723338,723378,723716-723791,724333-724372,724433-724438,724449,724481,724485,724668,724780,724782,724785,724793,724795,724940,725071,725316,725332,725335,725348,725364,725418,725425-725426,725455,725506,725554,725562,725651,725671,725688,725754,725773,725799,725839,726342,726524,726631,726634,726637,726639,726692,726724,726992,727096

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java?rev=727784&r1=727783&r2=727784&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java Thu Dec 18 10:28:30 2008
@@ -111,7 +111,7 @@
             String baseAddress = (String)exchange.getInMessage().get(Message.BASE_PATH);
             Response excResponse = JAXRSUtils.convertFaultToResponse(ex.getCause(), baseAddress);
             if (excResponse == null) {
-                ProviderFactory.getInstance(baseAddress).cleatThreadLocalProxies();
+                ProviderFactory.getInstance(baseAddress).clearThreadLocalProxies();
                 ClassResourceInfo criRoot =
                     (ClassResourceInfo)exchange.get(JAXRSInInterceptor.ROOT_RESOURCE_CLASS);
                 if (criRoot != null) {

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContext.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContext.java?rev=727784&r1=727783&r2=727784&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContext.java (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContext.java Thu Dec 18 10:28:30 2008
@@ -19,10 +19,33 @@
 
 package org.apache.cxf.jaxrs.ext;
 
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.Request;
+import javax.ws.rs.core.SecurityContext;
+import javax.ws.rs.core.UriInfo;
+import javax.ws.rs.ext.MessageBodyWorkers;
+
 /**
  * Represents an inbound internal message
  *
  */
 public interface MessageContext {
     Object get(Object key);
+    
+    UriInfo getUriInfo();
+    Request getRequest();
+    HttpHeaders getHttpHeaders();
+    SecurityContext getSecurityContext();
+    MessageBodyWorkers getProviders();
+    
+    HttpServletRequest getHttpServletRequest(); 
+    HttpServletResponse getHttpServletResponse();
+    ServletContext getServletContext();
+    ServletConfig getServletConfig();
+    
+    <T> T getContext(Class<T> contextClass);
 }

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java?rev=727784&r1=727783&r2=727784&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java Thu Dec 18 10:28:30 2008
@@ -18,6 +18,20 @@
  */
 package org.apache.cxf.jaxrs.ext;
 
+import java.lang.reflect.Type;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.Request;
+import javax.ws.rs.core.SecurityContext;
+import javax.ws.rs.core.UriInfo;
+import javax.ws.rs.ext.ContextResolver;
+import javax.ws.rs.ext.MessageBodyWorkers;
+
+import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.message.Message;
 
 public class MessageContextImpl implements MessageContext {
@@ -32,4 +46,53 @@
         return m.get(key);
     }
 
+    public <T> T getContext(Class<T> contextClass) {
+        return getContext(contextClass, contextClass);
+    }
+    
+    protected <T> T getContext(Type genericType, Class<T> clazz) {
+        return JAXRSUtils.createContextValue(m, genericType, clazz);
+    }
+    
+    @SuppressWarnings("unchecked")
+    public <T> ContextResolver<T> getContextResolver(Class<T> resolveClazz) {
+        return getContext(resolveClazz, ContextResolver.class);
+    }
+    
+    public Request getRequest() {
+        return getContext(Request.class);
+    }
+    
+    public HttpHeaders getHttpHeaders() {
+        return getContext(HttpHeaders.class);
+    }
+
+    public MessageBodyWorkers getProviders() {
+        return getContext(MessageBodyWorkers.class);
+    }
+
+    public SecurityContext getSecurityContext() {
+        return getContext(SecurityContext.class);
+    }
+
+    public UriInfo getUriInfo() {
+        return getContext(UriInfo.class);
+    }
+    
+    public HttpServletRequest getHttpServletRequest() {
+        return JAXRSUtils.createServletResourceValue(m, HttpServletRequest.class);
+    }
+
+    public HttpServletResponse getHttpServletResponse() {
+        return JAXRSUtils.createServletResourceValue(m, HttpServletResponse.class);
+    }
+    
+    public ServletConfig getServletConfig() {
+        return JAXRSUtils.createServletResourceValue(m, ServletConfig.class);
+    }
+
+    public ServletContext getServletContext() {
+        return JAXRSUtils.createServletResourceValue(m, ServletContext.class);
+    }
+
 }

Copied: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ProvidersImpl.java (from r727096, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ProvidersImpl.java)
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ProvidersImpl.java?p2=cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ProvidersImpl.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ProvidersImpl.java&r1=727096&r2=727784&rev=727784&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ProvidersImpl.java (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ProvidersImpl.java Thu Dec 18 10:28:30 2008
@@ -23,16 +23,14 @@
 import java.lang.reflect.Type;
 
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.ext.ContextResolver;
-import javax.ws.rs.ext.ExceptionMapper;
 import javax.ws.rs.ext.MessageBodyReader;
+import javax.ws.rs.ext.MessageBodyWorkers;
 import javax.ws.rs.ext.MessageBodyWriter;
-import javax.ws.rs.ext.Providers;
 
 import org.apache.cxf.jaxrs.provider.ProviderFactory;
 import org.apache.cxf.message.Message;
 
-public class ProvidersImpl implements Providers {
+public class ProvidersImpl implements MessageBodyWorkers {
 
     private Message m;
     public ProvidersImpl(Message m) {
@@ -51,13 +49,4 @@
                    type, genericType, annotations, mediaType, m);
     }
 
-    public <T> ContextResolver<T> getContextResolver(Class<T> contextType, MediaType mediaType) {
-        return ProviderFactory.getInstance((String)m.get(Message.BASE_PATH))
-            .createContextResolver(contextType, m, mediaType);
-    }
-
-    public <T extends Throwable> ExceptionMapper<T> getExceptionMapper(Class<T> type) {
-        return ProviderFactory.getInstance((String)m.get(Message.BASE_PATH)).createExceptionMapper(type, m);
-    }
-
 }

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalMessageContext.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalMessageContext.java?rev=727784&r1=727783&r2=727784&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalMessageContext.java (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalMessageContext.java Thu Dec 18 10:28:30 2008
@@ -19,6 +19,16 @@
 
 package org.apache.cxf.jaxrs.impl.tl;
 
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.Request;
+import javax.ws.rs.core.SecurityContext;
+import javax.ws.rs.core.UriInfo;
+import javax.ws.rs.ext.MessageBodyWorkers;
+
 import org.apache.cxf.jaxrs.ext.MessageContext;
 
 public class ThreadLocalMessageContext extends AbstractThreadLocalProxy<MessageContext> 
@@ -28,6 +38,44 @@
         return get().get(key);
     }
 
-    
+    public <T> T getContext(Class<T> contextClass) {
+        return get().getContext(contextClass);
+    }
+
+    public HttpHeaders getHttpHeaders() {
+        return get().getHttpHeaders();
+    }
+
+    public HttpServletRequest getHttpServletRequest() {
+        return get().getHttpServletRequest();
+    }
+
+    public HttpServletResponse getHttpServletResponse() {
+        return get().getHttpServletResponse();
+    }
+
+    public MessageBodyWorkers getProviders() {
+        return get().getProviders();
+    }
+
+    public SecurityContext getSecurityContext() {
+        return get().getSecurityContext();
+    }
+
+    public ServletConfig getServletConfig() {
+        return get().getServletConfig();
+    }
+
+    public ServletContext getServletContext() {
+        return get().getServletContext();
+    }
+
+    public UriInfo getUriInfo() {
+        return get().getUriInfo();
+    }
+
+    public Request getRequest() {
+        return get().getRequest();
+    }
 
 }

Copied: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalProviders.java (from r727096, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalProviders.java)
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalProviders.java?p2=cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalProviders.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalProviders.java&r1=727096&r2=727784&rev=727784&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalProviders.java (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalProviders.java Thu Dec 18 10:28:30 2008
@@ -23,14 +23,12 @@
 import java.lang.reflect.Type;
 
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.ext.ContextResolver;
-import javax.ws.rs.ext.ExceptionMapper;
 import javax.ws.rs.ext.MessageBodyReader;
+import javax.ws.rs.ext.MessageBodyWorkers;
 import javax.ws.rs.ext.MessageBodyWriter;
-import javax.ws.rs.ext.Providers;
 
-public class ThreadLocalProviders extends AbstractThreadLocalProxy<Providers>
-       implements Providers {
+public class ThreadLocalProviders extends AbstractThreadLocalProxy<MessageBodyWorkers>
+       implements MessageBodyWorkers {
 
     public <T> MessageBodyReader<T> getMessageBodyReader(Class<T> type, 
                                                          Type genericType, 
@@ -46,12 +44,4 @@
         return get().getMessageBodyWriter(type, genericType, annotations, mediaType);
     }
 
-    public <T> ContextResolver<T> getContextResolver(Class<T> contextType, MediaType mediaType) {
-        return get().getContextResolver(contextType, mediaType);
-    }
-
-    public <T extends Throwable> ExceptionMapper<T> getExceptionMapper(Class<T> type) {
-        return get().getExceptionMapper(type);
-    }
-
 }

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java?rev=727784&r1=727783&r2=727784&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java Thu Dec 18 10:28:30 2008
@@ -67,7 +67,7 @@
         } catch (RuntimeException ex) {
             Response excResponse = JAXRSUtils.convertFaultToResponse(ex, baseAddress);
             if (excResponse == null) {
-                ProviderFactory.getInstance(baseAddress).cleatThreadLocalProxies();
+                ProviderFactory.getInstance(baseAddress).clearThreadLocalProxies();
                 throw ex;
             }
             message.getExchange().put(Response.class, excResponse);

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java?rev=727784&r1=727783&r2=727784&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java Thu Dec 18 10:28:30 2008
@@ -61,7 +61,7 @@
         try {
             processResponse(message, baseAddress);
         } finally {
-            ProviderFactory.getInstance(baseAddress).cleatThreadLocalProxies();
+            ProviderFactory.getInstance(baseAddress).clearThreadLocalProxies();
             ClassResourceInfo cri =
                 (ClassResourceInfo)message.getExchange().get(JAXRSInInterceptor.ROOT_RESOURCE_CLASS);
             if (cri != null) {

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java?rev=727784&r1=727783&r2=727784&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java Thu Dec 18 10:28:30 2008
@@ -493,7 +493,7 @@
         return requestPreprocessor;
     }
     
-    public void cleatThreadLocalProxies() {
+    public void clearThreadLocalProxies() {
         clearProxies(defaultMessageReaders,
                      defaultMessageWriters,
                      userMessageReaders,

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java?rev=727784&r1=727783&r2=727784&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java Thu Dec 18 10:28:30 2008
@@ -39,6 +39,7 @@
 import java.util.TreeSet;
 import java.util.logging.Logger;
 
+import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -60,11 +61,12 @@
 import org.apache.cxf.jaxrs.impl.tl.ThreadLocalHttpHeaders;
 import org.apache.cxf.jaxrs.impl.tl.ThreadLocalHttpServletRequest;
 import org.apache.cxf.jaxrs.impl.tl.ThreadLocalHttpServletResponse;
-import org.apache.cxf.jaxrs.impl.tl.ThreadLocalMessageBodyWorkers;
 import org.apache.cxf.jaxrs.impl.tl.ThreadLocalMessageContext;
+import org.apache.cxf.jaxrs.impl.tl.ThreadLocalProviders;
 import org.apache.cxf.jaxrs.impl.tl.ThreadLocalProxy;
 import org.apache.cxf.jaxrs.impl.tl.ThreadLocalRequest;
 import org.apache.cxf.jaxrs.impl.tl.ThreadLocalSecurityContext;
+import org.apache.cxf.jaxrs.impl.tl.ThreadLocalServletConfig;
 import org.apache.cxf.jaxrs.impl.tl.ThreadLocalServletContext;
 import org.apache.cxf.jaxrs.impl.tl.ThreadLocalUriInfo;
 import org.apache.cxf.jaxrs.model.AbstractResourceInfo;
@@ -336,7 +338,7 @@
         } else if (Request.class.isAssignableFrom(type)) {
             proxy = new ThreadLocalRequest();
         }  else if (MessageBodyWorkers.class.isAssignableFrom(type)) {
-            proxy = new ThreadLocalMessageBodyWorkers();
+            proxy = new ThreadLocalProviders();
         } else if (HttpServletRequest.class.isAssignableFrom(type)) {
             proxy = new ThreadLocalHttpServletRequest();
         } else if (ServletContext.class.isAssignableFrom(type)) {
@@ -345,6 +347,8 @@
             proxy = new ThreadLocalHttpServletResponse();
         } else if (MessageContext.class.isAssignableFrom(type)) {
             proxy = new ThreadLocalMessageContext();
+        }  else if (ServletConfig.class.isAssignableFrom(type)) {
+            proxy = new ThreadLocalServletConfig();
         }
         return proxy;
     }

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java?rev=727784&r1=727783&r2=727784&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java Thu Dec 18 10:28:30 2008
@@ -36,11 +36,13 @@
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.ResourceBundle;
 import java.util.Set;
 import java.util.SortedMap;
 import java.util.TreeMap;
 import java.util.logging.Logger;
 
+import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -68,15 +70,15 @@
 import javax.ws.rs.ext.MessageBodyWorkers;
 import javax.ws.rs.ext.MessageBodyWriter;
 
+import org.apache.cxf.common.i18n.BundleUtils;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
-import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.jaxrs.ext.MessageContext;
 import org.apache.cxf.jaxrs.ext.MessageContextImpl;
 import org.apache.cxf.jaxrs.impl.HttpHeadersImpl;
-import org.apache.cxf.jaxrs.impl.MessageBodyWorkersImpl;
 import org.apache.cxf.jaxrs.impl.MetadataMap;
 import org.apache.cxf.jaxrs.impl.PathSegmentImpl;
+import org.apache.cxf.jaxrs.impl.ProvidersImpl;
 import org.apache.cxf.jaxrs.impl.RequestImpl;
 import org.apache.cxf.jaxrs.impl.SecurityContextImpl;
 import org.apache.cxf.jaxrs.impl.UriInfoImpl;
@@ -95,7 +97,7 @@
 
     public static final MediaType ALL_TYPES = new MediaType();
     private static final Logger LOG = LogUtils.getL7dLogger(JAXRSUtils.class);
-    //private static final ResourceBundle BUNDLE = BundleUtils.getBundle(JAXRSUtils.class);
+    private static final ResourceBundle BUNDLE = BundleUtils.getBundle(JAXRSUtils.class);
 
     private JAXRSUtils() {        
     }
@@ -387,8 +389,12 @@
             String contentType = (String)message.get(Message.CONTENT_TYPE);
 
             if (contentType == null) {
-                throw new Fault(new  org.apache.cxf.common.i18n.Message("NO_CONTENT_TYPE_SPECIFIED",
-                                                                        LOG, ori.getHttpMethod()));
+                org.apache.cxf.common.i18n.Message errorMsg = 
+                    new org.apache.cxf.common.i18n.Message("NO_CONTENT_TYPE_SPECIFIED", 
+                                                           BUNDLE, 
+                                                           ori.getHttpMethod());
+                LOG.fine(errorMsg.toString());
+                contentType = "*/*";
             }
 
             return readFromMessageBody(parameterClass,
@@ -534,7 +540,7 @@
                                   : defaultValue;
     }
     
-    public static Object createContextValue(Message m, Type genericType, Class<?> clazz) {
+    public static <T> T createContextValue(Message m, Type genericType, Class<T> clazz) {
  
         Object o = null;
         if (UriInfo.class.isAssignableFrom(clazz)) {
@@ -546,14 +552,15 @@
         } else if (SecurityContext.class.isAssignableFrom(clazz)) {
             o = new SecurityContextImpl(m);
         } else if (MessageBodyWorkers.class.isAssignableFrom(clazz)) {
-            o = new MessageBodyWorkersImpl(m);
+            o = new ProvidersImpl(m);
         } else if (ContextResolver.class.isAssignableFrom(clazz)) {
             o = createContextResolver(genericType, m);
         } else if (MessageContext.class.isAssignableFrom(clazz)) {
             o = new MessageContextImpl(m);
         }
         
-        return o == null ? createServletResourceValue(m, clazz) : o;
+        o = o == null ? createServletResourceValue(m, clazz) : o;
+        return clazz.cast(o);
     }
     
     @SuppressWarnings("unchecked")
@@ -577,19 +584,23 @@
         return createContextValue(m, genericType, clazz);
     }
     
-    private static Object createServletResourceValue(Message m, Class<?> clazz) {
+    public static <T> T createServletResourceValue(Message m, Class<T> clazz) {
         
+        Object value = null; 
         if (HttpServletRequest.class.isAssignableFrom(clazz)) {
-            return (HttpServletRequest) m.get(AbstractHTTPDestination.HTTP_REQUEST);
+            value = m.get(AbstractHTTPDestination.HTTP_REQUEST);
         }
         if (HttpServletResponse.class.isAssignableFrom(clazz)) {
-            return (HttpServletResponse) m.get(AbstractHTTPDestination.HTTP_RESPONSE);
+            value = m.get(AbstractHTTPDestination.HTTP_RESPONSE);
         }
         if (ServletContext.class.isAssignableFrom(clazz)) {
-            return (ServletContext) m.get(AbstractHTTPDestination.HTTP_CONTEXT);
+            value = m.get(AbstractHTTPDestination.HTTP_CONTEXT);
+        }
+        if (ServletConfig.class.isAssignableFrom(clazz)) {
+            value = m.get(AbstractHTTPDestination.HTTP_CONFIG);
         }
         
-        return null;
+        return clazz.cast(value);
     }
 
     private static Object readFromUriParam(Message m,

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java?rev=727784&r1=727783&r2=727784&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java Thu Dec 18 10:28:30 2008
@@ -22,6 +22,7 @@
 import java.util.List;
 
 import javax.annotation.Resource;
+import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -236,7 +237,8 @@
     
     public void testServletParams(@Context HttpServletRequest req,
                                   @Context HttpServletResponse res,
-                                  @Context ServletContext context) {
+                                  @Context ServletContext context,
+                                  @Context ServletConfig config) {
         // complete
     }
     

Copied: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/MessageContextImplTest.java (from r727096, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/MessageContextImplTest.java)
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/MessageContextImplTest.java?p2=cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/MessageContextImplTest.java&p1=cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/MessageContextImplTest.java&r1=727096&r2=727784&rev=727784&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/MessageContextImplTest.java (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/MessageContextImplTest.java Thu Dec 18 10:28:30 2008
@@ -27,7 +27,7 @@
 import javax.ws.rs.core.Request;
 import javax.ws.rs.core.SecurityContext;
 import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.ext.Providers;
+import javax.ws.rs.ext.MessageBodyWorkers;
 
 import org.apache.cxf.jaxrs.impl.HttpHeadersImpl;
 import org.apache.cxf.jaxrs.impl.ProvidersImpl;
@@ -84,7 +84,7 @@
     public void testProviders() {
         MessageContext mc = new MessageContextImpl(new MessageImpl());
         assertSame(ProvidersImpl.class, mc.getProviders().getClass());
-        assertSame(ProvidersImpl.class, mc.getContext(Providers.class).getClass());
+        assertSame(ProvidersImpl.class, mc.getContext(MessageBodyWorkers.class).getClass());
     }
     
     @Test

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java?rev=727784&r1=727783&r2=727784&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java Thu Dec 18 10:28:30 2008
@@ -25,6 +25,7 @@
 import java.util.HashMap;
 import java.util.List;
 
+import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -45,9 +46,9 @@
 import org.apache.cxf.jaxrs.JAXRSServiceImpl;
 import org.apache.cxf.jaxrs.SimpleFactory;
 import org.apache.cxf.jaxrs.impl.HttpHeadersImpl;
-import org.apache.cxf.jaxrs.impl.MessageBodyWorkersImpl;
 import org.apache.cxf.jaxrs.impl.MetadataMap;
 import org.apache.cxf.jaxrs.impl.PathSegmentImpl;
+import org.apache.cxf.jaxrs.impl.ProvidersImpl;
 import org.apache.cxf.jaxrs.impl.RequestImpl;
 import org.apache.cxf.jaxrs.impl.SecurityContextImpl;
 import org.apache.cxf.jaxrs.impl.UriInfoImpl;
@@ -691,7 +692,7 @@
         assertSame(HttpHeadersImpl.class, params.get(1).getClass());
         assertSame(RequestImpl.class, params.get(2).getClass());
         assertSame(SecurityContextImpl.class, params.get(3).getClass());
-        assertSame(MessageBodyWorkersImpl.class, params.get(4).getClass());
+        assertSame(ProvidersImpl.class, params.get(4).getClass());
         assertSame(String.class, params.get(5).getClass());
         assertEquals("Wrong header param", "bar", params.get(5));
         List<String> values = (List<String>)params.get(6);
@@ -730,27 +731,33 @@
                 Customer.class.getMethod("testServletParams", 
                                          new Class[]{HttpServletRequest.class, 
                                                      HttpServletResponse.class, 
-                                                     ServletContext.class}), 
+                                                     ServletContext.class,
+                                                     ServletConfig.class}), 
                 cri);
         ori.setHttpMethod("GET");
         HttpServletRequest request = EasyMock.createMock(HttpServletRequest.class);
         HttpServletResponse response = EasyMock.createMock(HttpServletResponse.class);
         ServletContext context = EasyMock.createMock(ServletContext.class);
+        ServletConfig config = EasyMock.createMock(ServletConfig.class);        
+        
         EasyMock.replay(request);
         EasyMock.replay(response);
         EasyMock.replay(context);
+        EasyMock.replay(config);
         
         Message m = new MessageImpl();
         m.put(AbstractHTTPDestination.HTTP_REQUEST, request);
         m.put(AbstractHTTPDestination.HTTP_RESPONSE, response);
         m.put(AbstractHTTPDestination.HTTP_CONTEXT, context);
+        m.put(AbstractHTTPDestination.HTTP_CONFIG, config);
         
         List<Object> params = 
             JAXRSUtils.processParameters(ori, new MetadataMap<String, String>(), m);
-        assertEquals("3 parameters expected", 3, params.size());
+        assertEquals("4 parameters expected", 4, params.size());
         assertSame(request.getClass(), params.get(0).getClass());
         assertSame(response.getClass(), params.get(1).getClass());
         assertSame(context.getClass(), params.get(2).getClass());
+        assertSame(config.getClass(), params.get(3).getClass());
         
     }
     
@@ -771,7 +778,7 @@
         assertSame(HttpHeadersImpl.class, c.getHeaders().getClass());
         assertSame(RequestImpl.class, c.getRequest().getClass());
         assertSame(SecurityContextImpl.class, c.getSecurityContext().getClass());
-        assertSame(MessageBodyWorkersImpl.class, c.getBodyWorkers().getClass());
+        assertSame(ProvidersImpl.class, c.getBodyWorkers().getClass());
         
     }
     
@@ -803,7 +810,7 @@
                    ((ThreadLocalProxy)c.getRequest()).get().getClass());
         assertSame(SecurityContextImpl.class, 
                    ((ThreadLocalProxy)c.getSecurityContext()).get().getClass());
-        assertSame(MessageBodyWorkersImpl.class, 
+        assertSame(ProvidersImpl.class, 
                    ((ThreadLocalProxy)c.getBodyWorkers()).get().getClass());
 
         assertSame(servletContextMock, 

Modified: cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java?rev=727784&r1=727783&r2=727784&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java (original)
+++ cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java Thu Dec 18 10:28:30 2008
@@ -36,6 +36,7 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -76,6 +77,7 @@
     public static final String HTTP_REQUEST = "HTTP.REQUEST";
     public static final String HTTP_RESPONSE = "HTTP.RESPONSE";
     public static final String HTTP_CONTEXT = "HTTP.CONTEXT";
+    public static final String HTTP_CONFIG = "HTTP.CONFIG";
     public static final String PROTOCOL_HEADERS_CONTENT_TYPE = Message.CONTENT_TYPE.toLowerCase();
         
     private static final Logger LOG = LogUtils.getL7dLogger(AbstractHTTPDestination.class);
@@ -242,14 +244,24 @@
     }
     
     protected void setupMessage(Message inMessage,
-                                  final ServletContext context, 
-                                  final HttpServletRequest req, 
-                                  final HttpServletResponse resp) throws IOException {
+                                final ServletContext context, 
+                                final HttpServletRequest req, 
+                                final HttpServletResponse resp) throws IOException {
+        setupMessage(inMessage, null, context, req, resp);
+    }
+    
+    protected void setupMessage(Message inMessage,
+                                final ServletConfig config,
+                                final ServletContext context, 
+                                final HttpServletRequest req, 
+                                final HttpServletResponse resp) throws IOException {
 
         inMessage.setContent(InputStream.class, req.getInputStream());
         inMessage.put(HTTP_REQUEST, req);
         inMessage.put(HTTP_RESPONSE, resp);
         inMessage.put(HTTP_CONTEXT, context);
+        inMessage.put(HTTP_CONFIG, config);
+        
         inMessage.put(Message.HTTP_REQUEST_METHOD, req.getMethod());
         inMessage.put(Message.REQUEST_URI, req.getRequestURI());
         String contextPath = req.getContextPath();

Modified: cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractCXFServlet.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractCXFServlet.java?rev=727784&r1=727783&r2=727784&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractCXFServlet.java (original)
+++ cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractCXFServlet.java Thu Dec 18 10:28:30 2008
@@ -52,24 +52,12 @@
     }
     
     public ServletController createServletController(ServletConfig servletConfig) {
-        String hideServiceList = servletConfig.getInitParameter("hide-service-list-page");
         ServletController newController =
-            new ServletController(servletTransportFactory, this.getServletContext(), bus);
-        if (hideServiceList != null) {
-            newController.setHideServiceList(Boolean.valueOf(hideServiceList));
-        }
-        String disableAddressUpdates = servletConfig.getInitParameter("disable-address-updates");
-        if (disableAddressUpdates != null) {
-            newController.setDisableAddressUpdates(Boolean.valueOf(disableAddressUpdates));
-        }
-        String forcedBaseAddress = servletConfig.getInitParameter("base-address");
-        if (forcedBaseAddress != null) {
-            newController.setForcedBaseAddress(forcedBaseAddress);
-        }
-        String serviceListStyleSheet = servletConfig.getInitParameter("service-list-stylesheet");
-        if (serviceListStyleSheet != null) {
-            newController.setServiceListStyleSheet(serviceListStyleSheet);
-        }
+            new ServletController(servletTransportFactory,
+                                  servletConfig,
+                                  this.getServletContext(), 
+                                  bus);
+        
         return newController;
     }
     

Modified: cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java?rev=727784&r1=727783&r2=727784&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java (original)
+++ cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java Thu Dec 18 10:28:30 2008
@@ -29,6 +29,7 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
@@ -50,6 +51,7 @@
 
     private ServletTransportFactory transport;
     private ServletContext servletContext;
+    private ServletConfig servletConfig;
     private Bus bus;
     private String lastBase = "";
     private boolean isHideServiceList;
@@ -57,11 +59,15 @@
     private String forcedBaseAddress;
     private String serviceListStyleSheet;
  
-    public ServletController(ServletTransportFactory df, ServletContext context, Bus b) {
+    public ServletController(ServletTransportFactory df,
+                             ServletConfig config,
+                             ServletContext context, 
+                             Bus b) {
         this.transport = df;
+        this.servletConfig = config;
         this.servletContext = context;
         this.bus = b;
-        df.setServletController(this);
+        init();
     }
     
     public void setHideServiceList(boolean generate) {
@@ -282,7 +288,7 @@
         }
 
         try {
-            d.invoke(servletContext, request, response);
+            d.invoke(servletConfig, servletContext, request, response);
         } catch (IOException e) {
             throw new ServletException(e);
         } finally {
@@ -292,4 +298,26 @@
         }
 
     }
+    
+    private void init() {
+        
+        transport.setServletController(this);
+        
+        String hideServiceList = servletConfig.getInitParameter("hide-service-list-page");
+        if (hideServiceList != null) {
+            isHideServiceList = Boolean.valueOf(hideServiceList);
+        }
+        String isDisableAddressUpdates = servletConfig.getInitParameter("disable-address-updates");
+        if (isDisableAddressUpdates != null) {
+            disableAddressUpdates = Boolean.valueOf(isDisableAddressUpdates);
+        }
+        String isForcedBaseAddress = servletConfig.getInitParameter("base-address");
+        if (isForcedBaseAddress != null) {
+            forcedBaseAddress = isForcedBaseAddress;
+        }
+        String serviceListTransform = servletConfig.getInitParameter("service-list-stylesheet");
+        if (serviceListTransform != null) {
+            serviceListStyleSheet = serviceListTransform;
+        }
+    }
 }

Modified: cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java?rev=727784&r1=727783&r2=727784&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java (original)
+++ cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java Thu Dec 18 10:28:30 2008
@@ -22,11 +22,11 @@
 import java.io.IOException;
 import java.util.logging.Logger;
 
+import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-
 import org.apache.cxf.Bus;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.message.ExchangeImpl;
@@ -73,13 +73,20 @@
         return LOG;
     }
 
-    
     public void invoke(final ServletContext context, 
-                         final HttpServletRequest req, 
-                         final HttpServletResponse resp) throws IOException {
+                       final HttpServletRequest req, 
+                       final HttpServletResponse resp) throws IOException {
+        invoke(null, context, req, resp);
+    }
+    
+    public void invoke(final ServletConfig config,
+                       final ServletContext context, 
+                       final HttpServletRequest req, 
+                       final HttpServletResponse resp) throws IOException {
         
         MessageImpl inMessage = new MessageImpl();
         setupMessage(inMessage,
+                     config,
                      context,
                      req,
                      resp);

Modified: cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/BookServerSecuritySpringClass.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/BookServerSecuritySpringClass.java?rev=727784&r1=727783&r2=727784&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/BookServerSecuritySpringClass.java (original)
+++ cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/BookServerSecuritySpringClass.java Thu Dec 18 10:28:30 2008
@@ -26,7 +26,7 @@
 public class BookServerSecuritySpringClass extends AbstractSpringServer {
 
     public BookServerSecuritySpringClass() {
-        super("/jaxrs_security");
+        super("/jaxrs_security_cglib");
     }
     
     public static void main(String args[]) {

Modified: cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/BookServerSecuritySpringInterface.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/BookServerSecuritySpringInterface.java?rev=727784&r1=727783&r2=727784&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/BookServerSecuritySpringInterface.java (original)
+++ cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/BookServerSecuritySpringInterface.java Thu Dec 18 10:28:30 2008
@@ -25,7 +25,7 @@
 public class BookServerSecuritySpringInterface extends AbstractSpringServer {
 
     public BookServerSecuritySpringInterface() {
-        super("/jaxrs_security_cglib");
+        super("/jaxrs_security");
     }    
     
     public static void main(String args[]) {

Modified: cxf/branches/2.1.x-fixes/systests/src/test/resources/jaxrs_security_no_annotations/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/src/test/resources/jaxrs_security_no_annotations/WEB-INF/beans.xml?rev=727784&r1=727783&r2=727784&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/src/test/resources/jaxrs_security_no_annotations/WEB-INF/beans.xml (original)
+++ cxf/branches/2.1.x-fixes/systests/src/test/resources/jaxrs_security_no_annotations/WEB-INF/beans.xml Thu Dec 18 10:28:30 2008
@@ -54,7 +54,6 @@
   </jaxrs:server>
 
   <bean id="bookstore" class="org.apache.cxf.systest.jaxrs.security.SecureBookStoreNoAnnotations"/>
-  <aop:config proxy-target-class="true"/>
   
   <security:global-method-security>
       <security:protect-pointcut 



Mime
View raw message