You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2010/11/04 08:52:16 UTC
svn commit: r1030848 - in /camel/trunk:
components/camel-cxf/src/main/java/org/apache/camel/component/cxf/
components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/
components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spri...
Author: ningjiang
Date: Thu Nov 4 07:52:16 2010
New Revision: 1030848
URL: http://svn.apache.org/viewvc?rev=1030848&view=rev
Log:
CAMEL-3308 upgrade the cxf version to 2.3.0
Modified:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfEndpointBean.java
camel/trunk/parent/pom.xml
Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java?rev=1030848&r1=1030847&r2=1030848&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java (original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java Thu Nov 4 07:52:16 2010
@@ -75,9 +75,16 @@ public class CxfConsumer extends Default
synchronized (continuation) {
if (continuation.isNew()) {
final org.apache.camel.Exchange camelExchange = perpareCamelExchange(cxfExchange);
+
+ // Now we don't set up the timeout value
+ if (LOG.isTraceEnabled()) {
+ LOG.trace("Suspending continuation of exchangeId: " + camelExchange.getExchangeId());
+ }
+ // The continuation could be called before the suspend is called
+ continuation.suspend(0);
// use the asynchronous API to process the exchange
- boolean sync = getAsyncProcessor().process(camelExchange, new AsyncCallback() {
+ getAsyncProcessor().process(camelExchange, new AsyncCallback() {
public void done(boolean doneSync) {
// make sure the continuation resume will not be called before the suspend method in other thread
synchronized (continuation) {
@@ -91,28 +98,7 @@ public class CxfConsumer extends Default
}
}
});
- // just need to avoid the continuation.resume is called
- // before the continuation.suspend is called
- if (continuation.getObject() != camelExchange && !sync) {
- // Now we don't set up the timeout value
- if (LOG.isTraceEnabled()) {
- LOG.trace("Suspending continuation of exchangeId: "
- + camelExchange.getExchangeId());
- }
- // The continuation could be called before the
- // suspend
- // is called
- continuation.suspend(0);
- } else {
- // just set the response back, as the invoking
- // thread is
- // not changed
- if (LOG.isTraceEnabled()) {
- LOG.trace("Processed the Exchange : " + camelExchange.getExchangeId());
- }
- setResponseBack(cxfExchange, camelExchange);
- }
-
+
}
if (continuation.isResumed()) {
org.apache.camel.Exchange camelExchange = (org.apache.camel.Exchange)continuation
Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java?rev=1030848&r1=1030847&r2=1030848&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java (original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java Thu Nov 4 07:52:16 2010
@@ -23,6 +23,7 @@ import java.util.logging.Logger;
import org.apache.cxf.feature.AbstractFeature;
import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.message.Message;
import org.apache.cxf.phase.PhaseInterceptor;
/**
@@ -32,7 +33,7 @@ public abstract class AbstractDataFormat
protected abstract Logger getLogger();
- protected void removeInterceptorWhichIsInThePhases(List<Interceptor> interceptors, String[] phaseNames) {
+ protected void removeInterceptorWhichIsInThePhases(List<Interceptor<? extends Message>> interceptors, String[] phaseNames) {
for (Interceptor i : interceptors) {
if (i instanceof PhaseInterceptor) {
PhaseInterceptor p = (PhaseInterceptor)i;
@@ -47,7 +48,7 @@ public abstract class AbstractDataFormat
}
}
- protected void removeInterceptorWhichIsOutThePhases(List<Interceptor> interceptors, String[] phaseNames) {
+ protected void removeInterceptorWhichIsOutThePhases(List<Interceptor<? extends Message>> interceptors, String[] phaseNames) {
for (Interceptor i : interceptors) {
boolean outside = false;
if (i instanceof PhaseInterceptor) {
@@ -67,7 +68,7 @@ public abstract class AbstractDataFormat
}
- protected void removeInterceptors(List<Interceptor> interceptors,
+ protected void removeInterceptors(List<Interceptor<? extends Message>> interceptors,
Collection<Class> toBeRemovedInterceptors) {
for (Interceptor interceptor : interceptors) {
if (toBeRemovedInterceptors.contains(interceptor.getClass())) {
Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfEndpointBean.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfEndpointBean.java?rev=1030848&r1=1030847&r2=1030848&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfEndpointBean.java (original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfEndpointBean.java Thu Nov 4 07:52:16 2010
@@ -19,14 +19,16 @@ package org.apache.camel.component.cxf.s
import java.util.List;
import org.apache.cxf.BusFactory;
+import org.apache.cxf.frontend.AbstractServiceFactory;
import org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory;
import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
+import org.apache.cxf.wsdl11.WSDLEndpointFactory;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.NamedBean;
-public class CxfEndpointBean extends AbstractWSDLBasedEndpointFactory
+public class CxfEndpointBean extends AbstractServiceFactory
implements DisposableBean, BeanNameAware, NamedBean {
private List handlers;
@@ -62,4 +64,5 @@ public class CxfEndpointBean extends Abs
public String getBeanName() {
return beanName;
}
+
}
Modified: camel/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=1030848&r1=1030847&r2=1030848&view=diff
==============================================================================
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Thu Nov 4 07:52:16 2010
@@ -52,7 +52,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.2.11</cxf-version>
+ <cxf-version>2.3.0</cxf-version>
<derby-version>10.4.2.0</derby-version>
<dozer-version>5.3.0</dozer-version>
<easymock-version>2.5.2</easymock-version>