Hi Claus

Thanks for looking into this.

Right now I'm on a short trip and will look into this tomorrow.

Babak

Am 23.06.2012 um 11:59 schrieb Claus Ibsen <claus.ib...@gmail.com>:

> Hi
> 
> I have digged a bit more.
> 
> The Camel Java DSL is not 100% compatible with the 2.9 branch.
> Commit rev 1244769 which is a compiler cleanup attempt had a side
> effect of causing the wire tap java dsl to break in certain
> situations.
> http://svn.apache.org/viewvc?rev=1244769&view=rev
> 
> This commit has only been done on trunk, and blocked for 2.9 and 2.8
> branches. So it only affect the new 2.10 RC.
> 
> Here is an example of a working DSL in Camel 2.9 or older
> 
>                from("file://target/rider/orders")
>                        .wireTap("seda:audit")
>                        .bean(OrderCsvToXmlBean.class)
>                        .to("jms:queue:orders");
> 
> 
> If you run this on Camel 2.10 you get this exception
> 
> java.lang.ClassCastException: org.apache.camel.model.WireTapDefinition
> cannot be cast to org.apache.camel.model.RouteDefinition
>    at camelinaction.AuditTest$1.configure(AuditTest.java:59)
>    at 
> org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:322)
>    at 
> org.apache.camel.builder.RouteBuilder.configureRoutes(RouteBuilder.java:276)
>    at 
> org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:262)
>    at 
> org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:619)
>    at 
> org.apache.camel.test.junit4.CamelTestSupport.doSetUp(CamelTestSupport.java:298)
>    at 
> org.apache.camel.test.junit4.CamelTestSupport.setUp(CamelTestSupport.java:217)
>    at camelinaction.AuditTest.setUp(AuditTest.java:34)
> 
> 
> I dont think our end users is capable of understanding this, and how
> to resolve it. To fix this you need to use .end() on the wireTap which
> becomes
> 
>                from("file://target/rider/orders")
>                        .wireTap("seda:audit").end() // need to end wireTap
>                        .bean(OrderCsvToXmlBean.class)
>                        .to("jms:queue:orders");
> 
> Then it works.
> 
> Since the 1244769 is not fixing any bugs etc. Then I think we should
> revert the changes that affects the Java DSL (eg the changes in the
> model package). Then we can be 100% backwards compatible in the Java
> DSL.
> 
> We may be able to only revert the change on the wire tap, as by
> looking at this commit, its the only one that is changed to have type
> on
> extends NoOutputDefinition<Type>
> 
> where as the others are
> extends NoOutputDefinition
> 
> 
> Any thoughts?
> 
> 
> 
> 
> On Thu, Jun 21, 2012 at 2:01 PM, Claus Ibsen <claus.ib...@gmail.com> wrote:
>> Hi
>> 
>> I upgraded the source code for Camel in Action book, and gave the
>> 2.10.0 a test spin.
>> 
>> The few migration pains was that camel-test dependency is now
>> camel-test-spring if you use Spring for testing.
>> This is expected and also on the release notes.
>> 
>> The issue I found is that the DSL for the WireTap has changed and I
>> got a ClassCastException.
>> I will dig into this later when I got some time.
>> 
>> 
>> On Wed, Jun 20, 2012 at 7:55 PM, Hadrian Zbarcea <hzbar...@gmail.com> wrote:
>>> A new release candidate apache-camel-2.10.0 final is out with approximately
>>> 473 issues resolved so far: improvements and bug fixes [1].
>>> 
>>> Please find the staging repo here:
>>> https://repository.apache.org/content/repositories/orgapachecamel-251/
>>> 
>>> The tarballs are here
>>> https://repository.apache.org/content/repositories/orgapachecamel-251/org/apache/camel/apache-camel/2.10.0/
>>> 
>>> Tag:
>>> http://svn.apache.org/repos/asf/camel/tags/camel-2.10.0/
>>> 
>>> Please review, help out with testing and vote to approve this release
>>> binary. Your vote counts!
>>> 
>>> [ ] +1 Release the binary as Apache Camel 2.10.0
>>> [ ] -1 Veto the release (provide specific comments)
>>> Vote is open for at least 72 hours.
>>> 
>>> Here's my +1.
>>> Hadrian
>>> 
>>> [1]
>>> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12311211&version=12317612
>>> 
>>> --
>>> Hadrian Zbarcea
>>> Principal Software Architect
>>> Talend, Inc
>>> http://coders.talend.com/
>>> http://camelbot.blogspot.com/
>> 
>> 
>> 
>> --
>> Claus Ibsen
>> -----------------
>> FuseSource
>> Email: cib...@fusesource.com
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
> 
> 
> 
> -- 
> Claus Ibsen
> -----------------
> FuseSource
> Email: cib...@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to