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] Resolved: (CAMEL-3061) Unbalanced API in the Java DSL for the scoped onException()
Date Wed, 25 Aug 2010 13:20:48 GMT

     [ 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.


Mime
View raw message