Are you sure the groovy script works as expected?
On Thu, Mar 10, 2011 at 3:14 PM, grafpoo <graf...@gmail.com> wrote: > hi all, my first post, so assume this is a dubmb question. > > running Camel 2.4 > > i've set up a database ingesting route that takes in an array of > hibernate-mapped objects, splits them, and sends the result to one of > several hibernate endpoints (one per mapped object). so the body coming in > is already a list, i just need to split it and send each data object on to a > choice route. > > it looks like this > split(body()) > .choice() > .when().groovy("request.body instanceof > package.data.DataObjectA").to("hib:package.data.DataObjectA") > .when().groovy("request.body instanceof > package.data.DataObjectB").to("hib:package.data.DataObjectB") > .when().groovy("request.body instanceof > package.data.DataObjectC").to("hib:package.data.DataObjectC") > .otherwise().to("log:noClassMatch?level=ERROR") > .end().to("log:afterHib?level=ERROR") > > the problem is that split doesn't seem to be splitting the body. i have > stuck in a couple of loggers, and can see that the body heading into split > is an ArrayList of my data objects. but all i get when passing in an array > of 2 of these is execution of the "otherwise", echoing back my array. > > i changed the split to add a method that reflected back a list with no > difference (none expected, to be fair) > > i have a vague vague notion that i had this working 9 months ago while using > camel 2.2 (which i cannot seem to find in any of the archives), but it seems > i am missing something here. > > any and all suggestions welcome, thanks. > john > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/split-not-splitting-tp3423342p3423342.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/