You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Christian Schneider (JIRA)" <ji...@apache.org> on 2009/11/03 13:37:52 UTC

[jira] Issue Comment Edited: (CAMEL-2128) Rollback does not work for transactional routes using camel-cxf

    [ https://issues.apache.org/activemq/browse/CAMEL-2128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55140#action_55140 ] 

Christian Schneider edited comment on CAMEL-2128 at 11/3/09 4:36 AM:
---------------------------------------------------------------------

Willem Jiang has created a patch that partly resolves this issue:


      was (Author: chris@die-schneider.net):
    Willem Jiang has created a patch that partly resolves this issue:
### Eclipse Workspace Patch 1.0
#P camel-cxf
Index: 
src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java
===================================================================
--- 
src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java 
(revision 831871)
+++ 
src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java 
(working copy)
@@ -271,6 +271,12 @@

              propagateResponseHeadersToCamel(outMessage, camelExchange);

+            // check if the outMessage has an 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);

  
> Rollback does not work for transactional routes using camel-cxf
> ---------------------------------------------------------------
>
>                 Key: CAMEL-2128
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2128
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.0.0
>            Reporter: Christian Schneider
>         Attachments: appcontext.xml, patch.txt
>
>
> I have a request reply service that should be able to do three different
> things:
> 1)  no exception occurs in the implementation: The jms Message should be
> committed and the normal reply should be sent
> 2) The implementation throws an exception defined in the service contract:
> The jms message should be committed and a fault should be sent
> 3) The implemementation throws another kind of exception: The message delivery should
> be rolled back so it can be received again
> Case 1 and 2 currently work as expected.
> For Case 3 a fault is returned to the caller and the transaction is committed which is wrong. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.