camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Closed: (CAMEL-645) Transactional Client - Doesnt set rollbackonly
Date Sun, 29 Jun 2008 16:38:00 GMT

     [ https://issues.apache.org/activemq/browse/CAMEL-645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen closed CAMEL-645.
-----------------------------

    Resolution: Duplicate

Is Dupliacted by CAMEL-634

> Transactional Client - Doesnt set rollbackonly
> ----------------------------------------------
>
>                 Key: CAMEL-645
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-645
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>             Fix For: 1.5.0
>
>
> The Camel TOE pattern - you have to see its wikipedia definition;)
> http://activemq.apache.org/camel/transactional-client.html
> And this user forum thread:
> http://www.nabble.com/Transaction-policy-not-correctly-rolling-back-on-exception.-td18173845s22882.html
> Got myself so much puzzled that I had to use some time indoor on a windy Sunday afternoon.

> The Camel TransactionInterceptor that handles the policy() DSL and does the wrapping
in the spring transaction template is as below:
> {code}
>     public void process(final Exchange exchange) {
>         LOG.info("transaction begin");
>         transactionTemplate.execute(new TransactionCallbackWithoutResult() {
>             protected void doInTransactionWithoutResult(TransactionStatus status) {
>                 try {
>                     processNext(exchange);
>                 } catch (Exception e) {
>                     throw new RuntimeCamelException(e);
>                 }
>             }
>         });
>         LOG.info("transaction commit");
>     }
> {code}
> But I am very confused as it doesn't handle any failures etc.
> Reading some of the extensive spring documentation at:
> http://static.springframework.org/spring/docs/2.5.x/reference/transaction.html
> I got the impression that we should handle this problematically in Camel.
> That we should check for these conditions:
> - exchange.failed => rollback
> - exception thrown => rollback (* and should we rethrow? - I guess not)
> I am working on some unit tests and a patch. We actually don't have any unit tests converting
this - or at least I couldn't find any.

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


Mime
View raw message