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 2010/08/25 15:20:48 UTC

[jira] Resolved: (CAMEL-3061) Unbalanced API in the Java DSL for the scoped onException()

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

Claus Ibsen resolved CAMEL-3061.
--------------------------------

      Assignee: Claus Ibsen  (was: Christian Mueller)
    Resolution: Fixed

trunk: 989092.

> Unbalanced API in the Java DSL for the scoped onException()
> -----------------------------------------------------------
>
>                 Key: CAMEL-3061
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3061
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 2.4.0
>         Environment: All
>            Reporter: Christian Mueller
>            Assignee: Claus Ibsen
>             Fix For: 2.5.0
>
>
> It's not possible to write the following route:
> {code}
> from("direct:saveOrderInDB")
> .transacted("PROPAGATION_REQUIRES_NEW")
> .onException(UpdateException.class, InsertException.class)
> .markRollbackOnlyLast().end()
> .beanRef("orderDAO", "updateOrInsertOrder");
> {code}
> You have to specify the route in the following way:
> {code}
> from("direct:saveOrderInDB")
> .transacted("PROPAGATION_REQUIRES_NEW")
> .onException(InsertException.class)
> .onException(UpdateException.class)
> .markRollbackOnlyLast().end()
> .beanRef("orderDAO", "updateOrInsertOrder");
> {code}
> But if you use a global onException() definition, you can write:
> {code}
> .onException(UpdateException.class, InsertException.class)
> .markRollbackOnlyLast()
> ...
> {code}
> Should we add this missing method?

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