How do you run/start Camel ? On Thu, Nov 10, 2011 at 8:14 PM, ebinsingh <[email protected]> wrote: > Hi, > > I have the below type converters in my util. > 1. Convert | de-limited String to List of tokens > 2. Convert String builder to String. > > CsvDataFormat csv = new CsvDataFormat(); > CSVStrategy strategy = CSVStrategy.DEFAULT_STRATEGY; > strategy.setDelimiter('|'); > csv.setStrategy(strategy); > > from("file:/camel_proj/data/input/mars") > .log("Starting to process big file: ${header.CamelFileName}") > .split(body().tokenize("\n")).streaming() > .unmarshal(csv).convertBodyTo(List.class) > .aggregate(constant(true), new > MyListAggregation()).completionSize(2000) > .executorService(threadPool1) > .bean(Parser1.class,"parseList") // Returns a StringBuilder > object > .convertBodyTo(String.class) > > .to("file:/camel_proj/data/output/mars?fileName=${file:onlyname.noext}"); > > Issue: > I see in the logs that the Camel TypeConverters are being Loaded for each > conversion. I would guess that the Converters should be loaded only for the > first call and subsequent conversions should use simply use them. > > Is this intentional? Is there a way to avoid re-loading again? > > Log: > > 2011-11-10 14:00:10,739 INFO [pool-2-thread-1] > converter.AnnotationTypeConverterLoader - Found 3 packages with 15 > @Converter classes to load > 2011-11-10 14:00:10,742 INFO [pool-2-thread-1] > converter.DefaultTypeConverter - Loaded 154 core type converters (total 154 > type converters) > 2011-11-10 14:00:10,743 INFO [pool-2-thread-1] > converter.AnnotationTypeConverterLoader - Loaded 2 @Converter classes > 2011-11-10 14:00:10,743 INFO [pool-2-thread-1] > converter.DefaultTypeConverter - Loaded additional 5 type converters (total > 159 type converters) in 0.001 seconds > > > 2011-11-10 14:00:10,870 INFO [pool-2-thread-1] > converter.DefaultTypeConverter - Loaded 154 core type converters (total 154 > type converters) > 2011-11-10 14:00:10,871 INFO [pool-2-thread-1] > converter.AnnotationTypeConverterLoader - Loaded 2 @Converter classes > 2011-11-10 14:00:10,871 INFO [pool-2-thread-1] > converter.DefaultTypeConverter - Loaded additional 5 type converters (total > 159 type converters) in 0.001 seconds > > > 2011-11-10 14:00:10,998 INFO [pool-2-thread-1] > converter.DefaultTypeConverter - Loaded 154 core type converters (total 154 > type converters) > 2011-11-10 14:00:10,999 INFO [pool-2-thread-1] > converter.AnnotationTypeConverterLoader - Loaded 2 @Converter classes > 2011-11-10 14:00:10,999 INFO [pool-2-thread-1] > converter.DefaultTypeConverter - Loaded additional 5 type converters (total > 159 type converters) in 0.001 seconds > > > Thanks & regards, > Ebe > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Type-Converters-Load-tp4982080p4982080.html > Sent from the Camel - Users mailing list archive at Nabble.com. >
-- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
