I checked out camel-core this morning (California time) and this problem
appears to be fixed.
However, please note that the build is now failing because of:
Results :
Failed tests:
testSendMatchingMessage(org.apache.camel.processor.FilterTest)
Tests run: 43, Failures: 1, Errors: 0, Skipped: 0
James.Strachan wrote:
>
> On 4/18/07, dr.jeff <[EMAIL PROTECTED]> wrote:
>>
>> The example as stated does not work:
>> public void configure() {
>> from("queue:a").choice()
>> .when(header("foo").isEqualTo("bar")).to("queue:b")
>> .when(header("foo").isEqualTo("cheese")).to("queue:c")
>> .otherwise().to("queue:d");
>> }
>>
>> The result is an IllegalStateException from the SendProcessor. It appears
>> to
>> not have been started during context.start().
>
> This was my bad, I'd broken a few things after a lifecycle related
> refactor of the code - bad James! Basically ChoiceProcessor wasn't
> invoking the lifecycle hooks of its child nodes.
>
> I've added an explicit ChoiceTest to subversion which explicitly tests
> this route does work correctly. (I found another bug along the way in
> ChoiceProcessor not actually invoking the predicates correctly :).
>
> If you grab the latest svn code it should be working fine now (and
> tomorrows nightly distro will be working too).
>
> In the componets, like camel-jms, we test routing through the
> component; but I'm trying to add a complete test suite of routing
> rules to camel-core which were missing until recently. We've now got a
> test case for Choice and IdempotentConsumer along with basic rounting
> of the Queue component. We should aim for > 90% code coverage of
> camel-core to check the other processors are totally working too.
>
> Thanks for spotting this!
>
>
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
>
--
View this message in context:
http://www.nabble.com/-camel--Content-Based-Router-tf3603123s2354.html#a10080141
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.