On Mon, Mar 22, 2010 at 10:40 AM, Drasil <pavel.dra...@gmail.com> wrote: > > That was in fact the first thing that I tried. But it did not help - the > end() method returns a generic ProcessorDefinition type, so there is still > no chance to invoke ChoiceDefinition-specific methods such as when() or > otherwise() on it. > > Maybe casting the result to ChoiceDefinition will help? But it would be a > really ugly solution. >
I got it working here locally with some changes in the DSL. I will "play" with a bit more to see if it dont break to much. The problem is many of the EIP can be configured further using their own builder methods and as you said end() is reverting back to a too generic type. It gotta "remember" its current scope and return back the ChoiceDefinition. Btw Spring XML does not have this issue as you can stack the XML tags as you like. > > Claus Ibsen-2 wrote: >> >> I recon you can try adding an end() after recipientList to get back the >> Type. >> >> Java generics is not really that well for doing DSL like language. >> > > -- > View this message in context: > http://old.nabble.com/RecipientList-%2B-Choice-no-longer-work-together-in-Camel-2.2.0--tp27983922p27984050.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus