camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <>
Subject [jira] [Resolved] (CAMEL-8783) Transacted not working correctly in scala
Date Wed, 20 May 2015 07:42:00 GMT


Willem Jiang resolved CAMEL-8783.
       Resolution: Fixed
    Fix Version/s: 2.15.3

It's caused by SAbstractDefinition wrap method doesn't return a write object, I just commit
a quick fix with a simple test of it.

> Transacted not working correctly in scala
> -----------------------------------------
>                 Key: CAMEL-8783
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-scala
>    Affects Versions: 2.15.2
>            Reporter: Fran├žois LAROCHE
>            Assignee: Willem Jiang
>             Fix For: 2.14.3, 2.16.0, 2.15.3
> When I try to use transacted in a scala route, I get an error and the camel context doesn't
> The error states that there is no output in route.
> After some time watching at the code with different breakpoints, I noticed :
> In org.apache.camel.scala.dsl.builder.RouteBuilder (l199) the transacted with URI doesn't
call the with the URI parameter.
> Even with this done, it still gives the same error : 
> "Route myRoute has no output processors. You need to add outputs to the route such as
> even when  my route is as simple as :
> "direct:something" ==> {
>   routeId("log:foo")
>   transacted("SomeStrategy")
>   --> ("log:foo")
> }
> After some more debug, I saw that the output list for the transacted node stays empty,
so my guess is that, in the org.apache.camel.scala.dsl.SAbstractDefinition class, the line
def transacted(ref: String) = wrap(target.transacted(ref)) should return something else to
handle outputs.
> Since I can mix java and scala routes, there are workarounds, but still, now that I've
gotten used to scala routes, I don't really want to go back to java routes ;)

This message was sent by Atlassian JIRA

View raw message