cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1300208 - in /cxf/trunk: distribution/src/main/release/samples/logbrowser/ rt/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ rt/frontend/jaxrs/src/main/java/o...
Date Tue, 13 Mar 2012 16:01:32 GMT
Author: sergeyb
Date: Tue Mar 13 16:01:30 2012
New Revision: 1300208

URL: http://svn.apache.org/viewvc?rev=1300208&view=rev
Log:
[CXF-4179,CXF-3141] Introducing ContextProviders and moving the search extension to its own
module

Added:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalInvocationHandler.java
  (with props)
    cxf/trunk/rt/rs/extensions/search/
    cxf/trunk/rt/rs/extensions/search/pom.xml   (with props)
    cxf/trunk/rt/rs/extensions/search/src/
    cxf/trunk/rt/rs/extensions/search/src/main/
    cxf/trunk/rt/rs/extensions/search/src/main/java/
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractComplexCondition.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractComplexCondition.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AndSearchCondition.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/AndSearchCondition.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/Beanspector.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/Beanspector.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/ConditionType.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/ConditionType.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/FiqlParseException.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/FiqlParseException.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/FiqlParser.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/FiqlParser.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/OrSearchCondition.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/OrSearchCondition.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/PrimitiveSearchCondition.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/PrimitiveSearchCondition.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/PrimitiveStatement.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/PrimitiveStatement.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchCondition.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchCondition.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchConditionVisitor.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchConditionVisitor.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContext.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContext.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SimpleSearchCondition.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/SimpleSearchCondition.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/client/
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/client/CompleteCondition.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/CompleteCondition.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/client/PartialCondition.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/PartialCondition.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/client/Property.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/Property.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/client/SearchConditionBuilder.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/SearchConditionBuilder.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/sql/
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/sql/SQLPrinterVisitor.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/sql/SQLPrinterVisitor.java
    cxf/trunk/rt/rs/extensions/search/src/test/
    cxf/trunk/rt/rs/extensions/search/src/test/java/
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/BeanspectorTest.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/BeanspectorTest.java
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/Book.java
  (with props)
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/FiqlParserTest.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/FiqlParserTest.java
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/SearchContextImplTest.java
      - copied, changed from r1299737, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/SearchContextImplTest.java
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/SimpleSearchConditionTest.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/SimpleSearchConditionTest.java
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/client/
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilderTest.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilderTest.java
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/client/SearchConditionBuilderTest.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/client/SearchConditionBuilderTest.java
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/sql/
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/sql/SQLPrinterVisitorTest.java
      - copied unchanged from r1299737, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/sql/SQLPrinterVisitorTest.java
Removed:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalSearchContext.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/
Modified:
    cxf/trunk/distribution/src/main/release/samples/logbrowser/pom.xml
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/SelectMethodCandidatesTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/MessageContextImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
    cxf/trunk/rt/management-web/pom.xml
    cxf/trunk/rt/pom.xml
    cxf/trunk/systests/jaxrs/pom.xml
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer.java
    cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_logging_atompull/WEB-INF/beans.xml

Modified: cxf/trunk/distribution/src/main/release/samples/logbrowser/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/logbrowser/pom.xml?rev=1300208&r1=1300207&r2=1300208&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/logbrowser/pom.xml (original)
+++ cxf/trunk/distribution/src/main/release/samples/logbrowser/pom.xml Tue Mar 13 16:01:30
2012
@@ -88,6 +88,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-rs-extension-search</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-transports-http-jetty</artifactId>
             <version>${project.version}</version>
         </dependency>

Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalInvocationHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalInvocationHandler.java?rev=1300208&view=auto
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalInvocationHandler.java
(added)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalInvocationHandler.java
Tue Mar 13 16:01:30 2012
@@ -0,0 +1,39 @@
+/**
+ * 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.cxf.jaxrs.impl.tl;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+
+
+public class ThreadLocalInvocationHandler<T> extends AbstractThreadLocalProxy<T>

+    implements InvocationHandler {
+
+    public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
+        Object target = null;
+        if (m.getDeclaringClass() == ThreadLocalProxy.class) {
+            target = this;    
+        } else {
+            target = get();
+        }
+        return m.invoke(target, args);
+    }
+
+}

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalInvocationHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalInvocationHandler.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java?rev=1300208&r1=1300207&r2=1300208&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
Tue Mar 13 16:01:30 2012
@@ -49,6 +49,7 @@ import org.apache.cxf.common.util.ClassH
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.jaxrs.client.ResponseExceptionMapper;
+import org.apache.cxf.jaxrs.ext.ContextProvider;
 import org.apache.cxf.jaxrs.ext.ParameterHandler;
 import org.apache.cxf.jaxrs.ext.RequestHandler;
 import org.apache.cxf.jaxrs.ext.ResponseHandler;
@@ -87,6 +88,8 @@ public final class ProviderFactory {
         new ArrayList<ProviderInfo<MessageBodyWriter<?>>>();
     private List<ProviderInfo<ContextResolver<?>>> contextResolvers = 
         new ArrayList<ProviderInfo<ContextResolver<?>>>(1);
+    private List<ProviderInfo<ContextProvider<?>>> contextProviders = 
+        new ArrayList<ProviderInfo<ContextProvider<?>>>(1);
     private List<ProviderInfo<ExceptionMapper<?>>> exceptionMappers = 
         new ArrayList<ProviderInfo<ExceptionMapper<?>>>(1);
     private List<ProviderInfo<RequestHandler>> requestHandlers = 
@@ -227,6 +230,32 @@ public final class ProviderFactory {
         
     }
     
+    @SuppressWarnings("unchecked")
+    public <T> ContextProvider<T> createContextProvider(Type contextType, 
+                                                        Message m) {
+        Class<?> contextCls = InjectionUtils.getActualType(contextType);
+        if (contextCls == null) {
+            return null;
+        }
+        for (ProviderInfo<ContextProvider<?>> cr : contextProviders) {
+            Type[] types = cr.getProvider().getClass().getGenericInterfaces();
+            for (Type t : types) {
+                if (t instanceof ParameterizedType) {
+                    ParameterizedType pt = (ParameterizedType)t;
+                    Type[] args = pt.getActualTypeArguments();
+                    if (args.length > 0) {
+                        Class<?> argCls = InjectionUtils.getActualType(args[0]);
+                        
+                        if (argCls != null && argCls.isAssignableFrom(contextCls))
{
+                            return (ContextProvider<T>)cr.getProvider();
+                        }
+                    }
+                }
+            }
+        }
+        return null;
+    }
+    
     
     public <T extends Throwable> ExceptionMapper<T> createExceptionMapper(Class<?>
exceptionType, Message m) {
         
@@ -462,6 +491,10 @@ public final class ProviderFactory {
                 contextResolvers.add(new ProviderInfo<ContextResolver<?>>((ContextResolver<?>)o));

             }
             
+            if (ContextProvider.class.isAssignableFrom(oClass)) {
+                contextProviders.add(new ProviderInfo<ContextProvider<?>>((ContextProvider<?>)o));

+            }
+            
             if (RequestHandler.class.isAssignableFrom(oClass)) {
                 requestHandlers.add(new ProviderInfo<RequestHandler>((RequestHandler)o));

             }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java?rev=1300208&r1=1300207&r2=1300208&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
Tue Mar 13 16:01:30 2012
@@ -71,17 +71,16 @@ import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.jaxrs.ext.MessageContext;
 import org.apache.cxf.jaxrs.ext.ParameterHandler;
 import org.apache.cxf.jaxrs.ext.ProtocolHeaders;
-import org.apache.cxf.jaxrs.ext.search.SearchContext;
 import org.apache.cxf.jaxrs.impl.MetadataMap;
 import org.apache.cxf.jaxrs.impl.PathSegmentImpl;
 import org.apache.cxf.jaxrs.impl.tl.ThreadLocalContextResolver;
 import org.apache.cxf.jaxrs.impl.tl.ThreadLocalHttpHeaders;
+import org.apache.cxf.jaxrs.impl.tl.ThreadLocalInvocationHandler;
 import org.apache.cxf.jaxrs.impl.tl.ThreadLocalMessageContext;
 import org.apache.cxf.jaxrs.impl.tl.ThreadLocalProtocolHeaders;
 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.ThreadLocalSearchContext;
 import org.apache.cxf.jaxrs.impl.tl.ThreadLocalSecurityContext;
 import org.apache.cxf.jaxrs.impl.tl.ThreadLocalUriInfo;
 import org.apache.cxf.jaxrs.model.AbstractResourceInfo;
@@ -862,8 +861,6 @@ public final class InjectionUtils {
             proxy = new ThreadLocalRequest();
         }  else if (Providers.class.isAssignableFrom(type)) {
             proxy = new ThreadLocalProviders();
-        } else if (SearchContext.class.isAssignableFrom(type)) {
-            proxy = new ThreadLocalSearchContext();
         } else if (MessageContext.class.isAssignableFrom(type)) {
             proxy = new ThreadLocalMessageContext();
         }
@@ -871,6 +868,11 @@ public final class InjectionUtils {
         if (proxy == null && isServletApiContext(type.getName())) {
             proxy = createThreadLocalServletApiContext(type.getName());  
         }
+        if (proxy == null) {
+            return (ThreadLocalProxy)Proxy.newProxyInstance(type.getClassLoader(),
+                                   new Class[] {type, ThreadLocalProxy.class },
+                                   new ThreadLocalInvocationHandler());
+        }
         
         return (ThreadLocalProxy<T>)proxy;
     }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java?rev=1300208&r1=1300207&r2=1300208&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java Tue
Mar 13 16:01:30 2012
@@ -72,13 +72,12 @@ import org.apache.cxf.common.logging.Log
 import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.jaxrs.ext.ContextProvider;
 import org.apache.cxf.jaxrs.ext.MessageContext;
 import org.apache.cxf.jaxrs.ext.MessageContextImpl;
 import org.apache.cxf.jaxrs.ext.ProtocolHeaders;
 import org.apache.cxf.jaxrs.ext.ProtocolHeadersImpl;
 import org.apache.cxf.jaxrs.ext.multipart.MultipartBody;
-import org.apache.cxf.jaxrs.ext.search.SearchContext;
-import org.apache.cxf.jaxrs.ext.search.SearchContextImpl;
 import org.apache.cxf.jaxrs.impl.HttpHeadersImpl;
 import org.apache.cxf.jaxrs.impl.HttpServletResponseFilter;
 import org.apache.cxf.jaxrs.impl.MetadataMap;
@@ -846,8 +845,6 @@ public final class JAXRSUtils {
             o = createContextResolver(genericType, contextMessage);
         } else if (MessageContext.class.isAssignableFrom(clazz)) {
             o = new MessageContextImpl(m);
-        } else if (SearchContext.class.isAssignableFrom(clazz)) {
-            o = new SearchContextImpl(m);
         } else if (Application.class.isAssignableFrom(clazz)) {
             ProviderInfo<?> providerInfo = 
                 (ProviderInfo<?>)contextMessage.getExchange().getEndpoint().get(Application.class.getName());
@@ -855,6 +852,13 @@ public final class JAXRSUtils {
         }
         if (o == null && contextMessage != null && !MessageUtils.isRequestor(contextMessage))
{
             o = createServletResourceValue(contextMessage, clazz);
+            if (o == null) {
+                ContextProvider<?> provider = 
+                    ProviderFactory.getInstance(m).createContextProvider(clazz, contextMessage);
+                if (provider != null) {
+                    o = provider.createContext(contextMessage);
+                }
+            }
         }
         return clazz.cast(o);
     }

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java?rev=1300208&r1=1300207&r2=1300208&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java Tue Mar 13
16:01:30 2012
@@ -64,6 +64,10 @@ import org.apache.cxf.jaxrs.impl.PathSeg
 
 public class Customer extends AbstractCustomer implements CustomerInfo {
     
+    public interface CustomerContext {
+        String get();
+    }
+    
     public interface CustomerBeanInterface {
         
     }
@@ -114,6 +118,7 @@ public class Customer extends AbstractCu
     
     @Context private ContextResolver<JAXBContext> cr;
     private UriInfo uriInfo;
+    @Context private CustomerContext customerContext;
     @Context private HttpHeaders headers;
     @Context private Request request;
     @Context private SecurityContext sContext;
@@ -452,7 +457,10 @@ public class Customer extends AbstractCu
     public void testContextResolvers(@Context ContextResolver<JAXBContext> resolver)
{
         // complete
     }
-    
+    public CustomerContext getCustomerContext() {
+        return customerContext;
+    }
+
     public static class CustomerBeanAdapter extends XmlAdapter<String, CustomerBean>
{
 
         @Override

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/SelectMethodCandidatesTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/SelectMethodCandidatesTest.java?rev=1300208&r1=1300207&r2=1300208&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/SelectMethodCandidatesTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/SelectMethodCandidatesTest.java
Tue Mar 13 16:01:30 2012
@@ -146,7 +146,7 @@ public class SelectMethodCandidatesTest 
         e.getEndpointInfo();
         EasyMock.expectLastCall().andReturn(null).anyTimes();
         e.get(ProviderFactory.class.getName());
-        EasyMock.expectLastCall().andReturn(ProviderFactory.getInstance()).times(2);
+        EasyMock.expectLastCall().andReturn(ProviderFactory.getInstance()).times(3);
         e.get("org.apache.cxf.jaxrs.comparator");
         EasyMock.expectLastCall().andReturn(null);
         EasyMock.replay(e);
@@ -193,7 +193,7 @@ public class SelectMethodCandidatesTest 
         e.getEndpointInfo();
         EasyMock.expectLastCall().andReturn(null).anyTimes();
         e.get(ProviderFactory.class.getName());
-        EasyMock.expectLastCall().andReturn(ProviderFactory.getInstance()).times(2);
+        EasyMock.expectLastCall().andReturn(ProviderFactory.getInstance()).times(3);
         e.get("org.apache.cxf.jaxrs.comparator");
         EasyMock.expectLastCall().andReturn(null);
         EasyMock.replay(e);

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/MessageContextImplTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/MessageContextImplTest.java?rev=1300208&r1=1300207&r2=1300208&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/MessageContextImplTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/MessageContextImplTest.java
Tue Mar 13 16:01:30 2012
@@ -23,6 +23,7 @@ import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.ws.rs.core.Application;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.Request;
 import javax.ws.rs.core.SecurityContext;
@@ -162,10 +163,33 @@ public class MessageContextImplTest exte
     
     @Test
     public void testNoContext() {
-        MessageContext mc = new MessageContextImpl(new MessageImpl());
+        MessageContext mc = new MessageContextImpl(createMessage());
         assertNull(mc.getContext(Message.class));
     }
     
+    private Message createMessage() {
+        ProviderFactory factory = ProviderFactory.getInstance();
+        Message m = new MessageImpl();
+        m.put("org.apache.cxf.http.case_insensitive_queries", false);
+        Exchange e = new ExchangeImpl();
+        m.setExchange(e);
+        e.setInMessage(m);
+        Endpoint endpoint = EasyMock.createMock(Endpoint.class);
+        endpoint.getEndpointInfo();
+        EasyMock.expectLastCall().andReturn(null).anyTimes();
+        endpoint.get(Application.class.getName());
+        EasyMock.expectLastCall().andReturn(null);
+        endpoint.size();
+        EasyMock.expectLastCall().andReturn(0).anyTimes();
+        endpoint.isEmpty();
+        EasyMock.expectLastCall().andReturn(true).anyTimes();
+        endpoint.get(ProviderFactory.class.getName());
+        EasyMock.expectLastCall().andReturn(factory).anyTimes();
+        EasyMock.replay(endpoint);
+        e.put(Endpoint.class, endpoint);
+        return m;
+    }
+    
     public static class CustomContextResolver implements ContextResolver<JAXBContext>
{
 
         public JAXBContext getContext(Class<?> type) {

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java?rev=1300208&r1=1300207&r2=1300208&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
Tue Mar 13 16:01:30 2012
@@ -52,6 +52,7 @@ import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.jaxrs.Customer;
+import org.apache.cxf.jaxrs.Customer.CustomerContext;
 import org.apache.cxf.jaxrs.Customer2;
 import org.apache.cxf.jaxrs.CustomerApplication;
 import org.apache.cxf.jaxrs.CustomerGender;
@@ -63,6 +64,7 @@ import org.apache.cxf.jaxrs.JAXRSService
 import org.apache.cxf.jaxrs.JAXRSServiceImpl;
 import org.apache.cxf.jaxrs.SimpleFactory;
 import org.apache.cxf.jaxrs.Timezone;
+import org.apache.cxf.jaxrs.ext.ContextProvider;
 import org.apache.cxf.jaxrs.ext.ParameterHandler;
 import org.apache.cxf.jaxrs.impl.HttpHeadersImpl;
 import org.apache.cxf.jaxrs.impl.HttpServletResponseFilter;
@@ -158,6 +160,33 @@ public class JAXRSUtilsTest extends Asse
     }
     
     @Test
+    public void testInjectCustomContext() throws Exception {
+        final CustomerContext contextImpl = new CustomerContext() {
+
+            public String get() {
+                return "customerContext";
+            }
+            
+        };
+        JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
+        Customer customer = new Customer();
+        sf.setServiceBeanObjects(customer);
+        sf.setProvider(new ContextProvider<CustomerContext>() {
+            public CustomerContext createContext(Message message) {
+                // TODO Auto-generated method stub
+                return contextImpl;
+            }
+        });
+        sf.setStart(false);
+        Server s = sf.create();  
+        assertTrue(customer.getCustomerContext() instanceof ThreadLocalProxy<?>);
+        invokeCustomerMethod(sf.getServiceFactory().getClassResourceInfo().get(0),
+                             customer, s);
+        CustomerContext context = customer.getCustomerContext();
+        assertEquals("customerContext", context.get());
+    }
+    
+    @Test
     public void testInjectApplicationInSingleton() throws Exception {
         CustomerApplication app = new CustomerApplication();
         JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
@@ -1590,7 +1619,7 @@ public class JAXRSUtilsTest extends Asse
         
         OperationResourceInfo ori = new OperationResourceInfo(Customer.class.getMethods()[0],
                                                               cri); 
-        Message message = new MessageImpl();
+        Message message = createMessage();
         InjectionUtils.injectContextMethods(c, ori.getClassResourceInfo(), message);
         assertNotNull(c.getUriInfo());
         assertSame(ThreadLocalUriInfo.class, c.getUriInfo().getClass());

Modified: cxf/trunk/rt/management-web/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/pom.xml?rev=1300208&r1=1300207&r2=1300208&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/pom.xml (original)
+++ cxf/trunk/rt/management-web/pom.xml Tue Mar 13 16:01:30 2012
@@ -89,6 +89,11 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-rs-extension-search</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
             <groupId>${cxf.servlet-api.group}</groupId>
             <artifactId>${cxf.servlet-api.artifact}</artifactId>
             <scope>provided</scope>

Modified: cxf/trunk/rt/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/pom.xml?rev=1300208&r1=1300207&r2=1300208&view=diff
==============================================================================
--- cxf/trunk/rt/pom.xml (original)
+++ cxf/trunk/rt/pom.xml Tue Mar 13 16:01:30 2012
@@ -55,6 +55,7 @@
         <module>ws/security</module>
         <module>ws/mex</module>
         <module>rs/extensions/providers</module>
+        <module>rs/extensions/search</module> 
         <module>rs/security/xml</module>
         <module>rs/security/oauth-parent</module>
         <module>rs/security/cors</module>

Added: cxf/trunk/rt/rs/extensions/search/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/search/pom.xml?rev=1300208&view=auto
==============================================================================
--- cxf/trunk/rt/rs/extensions/search/pom.xml (added)
+++ cxf/trunk/rt/rs/extensions/search/pom.xml Tue Mar 13 16:01:30 2012
@@ -0,0 +1,61 @@
+<!--
+  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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.cxf</groupId>
+    <artifactId>cxf-rt-rs-extension-search</artifactId>
+    <packaging>jar</packaging>
+    <version>2.6.0-SNAPSHOT</version>
+    <name>Apache CXF JAX-RS Extensions: Search</name>
+    <description>Apache CXF JAX-RS Extensions: Search</description>
+    <url>http://cxf.apache.org</url>
+
+    <parent>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf-parent</artifactId>
+        <version>2.6.0-SNAPSHOT</version>
+        <relativePath>../../../../parent/pom.xml</relativePath>
+    </parent>
+
+    <properties>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-jaxrs</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.easymock</groupId>
+            <artifactId>easymock</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+        </plugins>
+    </build>
+</project>

Propchange: cxf/trunk/rt/rs/extensions/search/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/rs/extensions/search/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/rs/extensions/search/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/Book.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/Book.java?rev=1300208&view=auto
==============================================================================
--- cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/Book.java
(added)
+++ cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/Book.java
Tue Mar 13 16:01:30 2012
@@ -0,0 +1,83 @@
+/**
+ * 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.cxf.jaxrs.ext.search;
+
+import javax.ws.rs.GET;
+import javax.xml.bind.annotation.XmlRootElement;
+
+
+@XmlRootElement(name = "Book")
+public class Book implements Comparable<Book> {
+    private String name;
+    private long id;
+    
+    public Book() {
+    }
+    
+    public Book(String name, long id) {
+        this.name = name;
+        this.id = id;
+    }
+    
+    public void setName(String n) {
+        name = n;
+    }
+
+    public String getName() {
+        return name;
+    }
+    
+    public void setId(long i) {
+        id = i;
+    }
+    public long getId() {
+        return id;
+    }
+    
+    
+    @GET
+    public String getState() {
+        return "";
+    }
+    
+    
+    public void setState(String s) {
+    }
+    
+    public int hashCode() { 
+        return name.hashCode() * 37 + new Long(id).hashCode();
+    }
+    
+    public boolean equals(Object o) {
+        if (!(o instanceof Book)) {
+            return false;
+        }
+        Book other = (Book)o;
+        
+        return other.name.equals(name) && other.id == id;
+        
+    }
+
+    public int compareTo(Book b) {
+        Long i1 = new Long(getId());
+        Long i2 = new Long(b.getId());
+        return i1.compareTo(i2);
+    }
+}

Propchange: cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/Book.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/Book.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/SearchContextImplTest.java
(from r1299737, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/SearchContextImplTest.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/SearchContextImplTest.java?p2=cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/SearchContextImplTest.java&p1=cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/SearchContextImplTest.java&r1=1299737&r2=1300208&rev=1300208&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/SearchContextImplTest.java
(original)
+++ cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/SearchContextImplTest.java
Tue Mar 13 16:01:30 2012
@@ -21,7 +21,6 @@ package org.apache.cxf.jaxrs.ext.search;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.cxf.jaxrs.resources.Book;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
 

Modified: cxf/trunk/systests/jaxrs/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/pom.xml?rev=1300208&r1=1300207&r2=1300208&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/pom.xml (original)
+++ cxf/trunk/systests/jaxrs/pom.xml Tue Mar 13 16:01:30 2012
@@ -110,6 +110,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-rs-extension-search</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-frontend-js</artifactId>
             <version>${project.version}</version>
         </dependency>

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer.java?rev=1300208&r1=1300207&r2=1300208&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer.java (original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer.java Tue
Mar 13 16:01:30 2012
@@ -27,6 +27,7 @@ import java.util.Map;
 
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
+import org.apache.cxf.jaxrs.ext.search.SearchContextProvider;
 import org.apache.cxf.jaxrs.lifecycle.SingletonResourceProvider;
 import org.apache.cxf.jaxrs.provider.BinaryDataProvider;
 import org.apache.cxf.jaxrs.provider.JAXBElementProvider;
@@ -55,6 +56,7 @@ public class BookServer extends Abstract
         providers.add(new FormatResponseHandler());
         providers.add(new GenericHandlerWriter());
         providers.add(new FaultyRequestHandler());
+        providers.add(new SearchContextProvider());
         sf.setProviders(providers);
         List<Interceptor<? extends Message>> outInts = new ArrayList<Interceptor<?
extends Message>>();
         outInts.add(new CustomOutInterceptor());

Modified: cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_logging_atompull/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_logging_atompull/WEB-INF/beans.xml?rev=1300208&r1=1300207&r2=1300208&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_logging_atompull/WEB-INF/beans.xml (original)
+++ cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_logging_atompull/WEB-INF/beans.xml Tue
Mar 13 16:01:30 2012
@@ -120,6 +120,7 @@ http://www.springframework.org/schema/ut
 		</jaxrs:serviceBeans>
 		<jaxrs:providers>
 			<ref bean="feed" />
+			<bean class="org.apache.cxf.jaxrs.ext.search.SearchContextProvider"/>
 		</jaxrs:providers>
 	</jaxrs:server>
 	
@@ -129,6 +130,7 @@ http://www.springframework.org/schema/ut
 		</jaxrs:serviceBeans>
 		<jaxrs:providers>
 			<ref bean="feed" />
+			<bean class="org.apache.cxf.jaxrs.ext.search.SearchContextProvider"/>
 		</jaxrs:providers>
 	</jaxrs:server>
 	
@@ -138,6 +140,7 @@ http://www.springframework.org/schema/ut
 		</jaxrs:serviceBeans>
 		<jaxrs:providers>
 			<ref bean="feed" />
+			<bean class="org.apache.cxf.jaxrs.ext.search.SearchContextProvider"/>
 		</jaxrs:providers>
 	</jaxrs:server>
 
@@ -148,6 +151,7 @@ http://www.springframework.org/schema/ut
 		<jaxrs:providers>
 			<ref bean="feed" />
 			<ref bean="entry" />
+			<bean class="org.apache.cxf.jaxrs.ext.search.SearchContextProvider"/>
 		</jaxrs:providers>
 	</jaxrs:server>
 	
@@ -157,6 +161,7 @@ http://www.springframework.org/schema/ut
 		</jaxrs:serviceBeans>
 		<jaxrs:providers>
 			<ref bean="feed" />
+			<bean class="org.apache.cxf.jaxrs.ext.search.SearchContextProvider"/>
 		</jaxrs:providers>
 	</jaxrs:server>
 	
@@ -166,6 +171,7 @@ http://www.springframework.org/schema/ut
 		</jaxrs:serviceBeans>
 		<jaxrs:providers>
 			<ref bean="feed" />
+			<bean class="org.apache.cxf.jaxrs.ext.search.SearchContextProvider"/>
 		</jaxrs:providers>
 	</jaxrs:server>
 	
@@ -175,6 +181,7 @@ http://www.springframework.org/schema/ut
 		</jaxrs:serviceBeans>
 		<jaxrs:providers>
 			<ref bean="feed" />
+			<bean class="org.apache.cxf.jaxrs.ext.search.SearchContextProvider"/>
 		</jaxrs:providers>
 	</jaxrs:server>
     
@@ -184,12 +191,14 @@ http://www.springframework.org/schema/ut
 		</jaxrs:serviceBeans>
 		<jaxrs:providers>
 			<ref bean="feed" />
+			<bean class="org.apache.cxf.jaxrs.ext.search.SearchContextProvider"/>
 		</jaxrs:providers>
 	</jaxrs:server>
     
     <jaxrs:server id="atomReset" address="/reset">
 		<jaxrs:serviceBeans>
 			<ref bean="atomServerReset"/>
+			<bean class="org.apache.cxf.jaxrs.ext.search.SearchContextProvider"/>
 		</jaxrs:serviceBeans>
 	</jaxrs:server>
 



Mime
View raw message