You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2008/06/29 16:14:00 UTC
[jira] Created: (CAMEL-645) Transactional Client - Doesnt set
rollbackonly
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.
[jira] Closed: (CAMEL-645) Transactional Client - Doesnt set
rollbackonly
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ 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.