Author: ningjiang
Date: Wed Nov 4 01:58:19 2009
New Revision: 832647
URL: http://svn.apache.org/viewvc?rev=832647&view=rev
Log:
CAMEL-2128 support rollback in transactional routes which is used in camel
transport.
Modified:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java
Modified:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java?rev=832647&r1=832646&r2=832647&view=diff
==============================================================================
---
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java
(original)
+++
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java
Wed Nov 4 01:58:19 2009
@@ -271,6 +271,12 @@
propagateResponseHeadersToCamel(outMessage, camelExchange);
+ // check if the outMessage has the exception
+ Exception exception = outMessage.getContent(Exception.class);
+ if (exception != null) {
+ camelExchange.setException(exception);
+ }
+
CachedOutputStream outputStream =
(CachedOutputStream)outMessage.getContent(OutputStream.class);
camelExchange.getOut().setBody(outputStream.getBytes());
getLogger().log(Level.FINE, "send the response message: " +
outputStream);