svn commit: r832647 - /camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java

View: New views
1 Messages — Rating Filter:   Alert me  

svn commit: r832647 - /camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java

by ningjiang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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);


Need professional support or training for Apache Camel? Graphic Design by Hiram and the Nabble Forum configured by James