camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpcook <jonathan.c...@erars.plus.com>
Subject Using Exchange.SPLIT_INDEX
Date Tue, 19 May 2009 11:24:23 GMT

Hello,

I have recently upgraded to Camel 2 which has a different implementation of
splitting messages or seems to.
http://camel.apache.org/splitter.html

Specifically the CamelSplitIndex header. In my routebuilder I have used
split and supplied my own SplitExpression class. This all works nicely and
the log statements confirm this. I want to use the Exchange.SPLIT_INDEX and
set that on my own component. But it is returning the string literal
camelSplitIndex which is the default value defined in Exchange.java. I'm not
sure If I have to set this header myself? But this all worked in camel 1.5
using the Splitter.SPLIT_COUNTER?

                        .split(new
BatchSplitExpression("/locations/location", 10))			
			.setBody(GroovyLanguage.groovy("'<?xml version=\"1.0\"
encoding=\"UTF-8\"?><locations>'+request.body+'</locations>'"))
			.to("log:AfterSplit")
			.process(XsltBuilder.xslt(new
File("xslt\\observations\\ceefax\\daily_observations.ceefax.xslt")))
			.to("log:AfterTransform")
			.process(new PlasmaPaginatorProcessor(18, false))			             
			.setHeader(PlasmaComponent.PLASMA_PAGE_NO,
GroovyLanguage.groovy("'"+Exchange.SPLIT_INDEX+"'"))

Thanks
-- 
View this message in context: http://www.nabble.com/Using-Exchange.SPLIT_INDEX-tp23614318p23614318.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message