camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1043385 - in /camel/trunk: components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsInvoker.java parent/pom.xml
Date Wed, 08 Dec 2010 12:45:29 GMT
Author: ningjiang
Date: Wed Dec  8 12:45:28 2010
New Revision: 1043385

URL: http://svn.apache.org/viewvc?rev=1043385&view=rev
Log:
CAMEL-3409 Upgraded CXF version to 2.3.1

Modified:
    camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsInvoker.java
    camel/trunk/parent/pom.xml

Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsInvoker.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsInvoker.java?rev=1043385&r1=1043384&r2=1043385&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsInvoker.java
(original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsInvoker.java
Wed Dec  8 12:45:28 2010
@@ -51,62 +51,7 @@ public class CxfRsInvoker extends JAXRSI
         this.endpoint = endpoint;
         this.cxfRsConsumer = consumer;
     }
-    
-    // To work around the invoke reenter issue
-    public Object invoke(Exchange exchange, Object request) {
-        // These code 
-        Response response = exchange.get(Response.class);
-        if (response != null) {
-            return new MessageContentsList(response);
-        }
-        ResourceProvider provider = getResourceProvider(exchange);
-        Object serviceObject = getServiceObject(exchange);
-        try {
-            return invoke(exchange, request, serviceObject);
-        } finally {
-            if (Boolean.TRUE.equals(exchange.get(SUSPENED))) {
-                // should check the 
-                exchange.put(JAXRSUtils.ROOT_INSTANCE, serviceObject);
-                exchange.put(JAXRSUtils.ROOT_PROVIDER, provider);
-            } else {
-                // clean up the resource
-                if (exchange.isOneWay()) {
-                    ProviderFactory.getInstance(exchange.getInMessage()).clearThreadLocalProxies();
-                }
-                if (!isServiceObjectRequestScope(exchange.getInMessage())) {
-                    provider.releaseInstance(exchange.getInMessage(), serviceObject);
-                }
-                exchange.remove(JAXRSUtils.ROOT_INSTANCE);
-                exchange.remove(JAXRSUtils.ROOT_PROVIDER);
-            }
-        }
-    }
-    
-    public Object getServiceObject(Exchange exchange) {
-        if (exchange.get(JAXRSUtils.ROOT_INSTANCE) != null) {
-            return exchange.get(JAXRSUtils.ROOT_INSTANCE);
-        } else {
-            OperationResourceInfo ori = exchange.get(OperationResourceInfo.class);
-            ClassResourceInfo cri = ori.getClassResourceInfo();
-            return cri.getResourceProvider().getInstance(exchange.getInMessage());
-        }
-    }
         
-    private ResourceProvider getResourceProvider(Exchange exchange) {
-        if (exchange.get(JAXRSUtils.ROOT_PROVIDER) != null) {
-            return (ResourceProvider)exchange.get(JAXRSUtils.ROOT_PROVIDER);
-        } else {
-            OperationResourceInfo ori = exchange.get(OperationResourceInfo.class);
-            ClassResourceInfo cri = ori.getClassResourceInfo();
-            return cri.getResourceProvider();
-        }
-    }
-    
-    private boolean isServiceObjectRequestScope(Message inMessage) {
-        Object scope = inMessage.getContextualProperty(SERVICE_OBJECT_SCOPE);
-        return REQUEST_SCOPE.equals(scope);
-    }
-    
     protected Object performInvocation(Exchange cxfExchange, final Object serviceObject,
Method method,
                                        Object[] paramArray) throws Exception {
         paramArray = insertExchange(method, paramArray, cxfExchange);

Modified: camel/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=1043385&r1=1043384&r2=1043385&view=diff
==============================================================================
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Wed Dec  8 12:45:28 2010
@@ -51,7 +51,7 @@
     <commons-collections-version>3.2.1</commons-collections-version>
     <commons-pool-version>1.5.4</commons-pool-version>
     <commons-dbcp-version>1.3</commons-dbcp-version>
-    <cxf-version>2.3.0</cxf-version>
+    <cxf-version>2.3.1</cxf-version>
     <cxf-xjc-utils-version>2.3.0</cxf-xjc-utils-version>
     <derby-version>10.4.2.0</derby-version>
     <dozer-version>5.3.1</dozer-version>



Mime
View raw message