camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Mitchell <nick.mitch...@hmv.co.uk>
Subject Re: FileComponent Camel 2.2
Date Wed, 07 Apr 2010 09:35:46 GMT

from(cronTriggerExpression) 
		       .pollEnrich(ebookRemoteFTPIn,0) 
        .idempotentConsumer(header("CamelFileName"),filenameRepository)		       
	   	.to(ebookIn);

	   from(ebookIn)
		   	.process( new SetupChildRouteRuntime(metaRouteId,childRouteId+0,
baseDao) )
		   	.unmarshal(new XMLebookDataFormat())
		   	.process(new CSVebookProcessor(ebookOut,
        							ebookTable,
        							authorTable,
        							drminfoTable,
        				    		ebookSubjectTable,
        				    		abstractBook2BiccodeTable,
        				    		bisacBicDao,
        				    		bicClassificationDao,
        				    		ebooksOtherFormatsTable,
        				    		ebooksExcerptTable,
        				    		ebookDigitalInfoTable,
        				    		ebooksOtherTitlesTable,
        				    		publisherTable,
        				    		imprintTable,
        				    		catalogDao,
        				    		productDao,
        				    		composedTypeDao,
        				    		etlStats,
        				    		true,
        				    		currentVatRate
        							) )
        .setHeader("FILE_ID",
SimpleLanguage.simple("${file:onlyname.noext}"))
        .process(new ZipProcessorHybris(ebookOut, ebookZipOut,
ebookOutFileName, true, ebookZipIn,
        		0L, "[_.]","_{0}_{date}",etlStats))
        .process(new EmailProcessor(mailService,etlStats,ebookZipIn))
        .process( new EtlProcessSuccess(baseDao))
	    .process(new CleanExchange())
	    .delay().method( "com.lbi.etl.utils.beans.Delayer", "forceGC" );

I've tried to fill in some constants so it makes a bit more sense to you.
The processors in the route don't really do much. Basically the route polls
for an XML file, processes the XML file, converts to a csv format, puts the
output file in a different directory and emails to say successful.

Cheers
Nick


Claus Ibsen-2 wrote:
> 
> Hi
> 
> Could you post your route? I will then use it to reproduce the issue
> on my laptop.
> 
> 
> On Wed, Apr 7, 2010 at 10:45 AM, Nick Mitchell <nick.mitchell@hmv.co.uk>
> wrote:
>>
>> We are setting FILE_ID in the header
>>
>> .setHeader(FILE_ID, SimpleLanguage.simple("${file:onlyname.noext}"))
>>
>> If I change the file expression to ${file:name.ext} then it does move it
>> to
>> .camel folder. I confused as to why it worked before and not now though.
>> --
>> View this message in context:
>> http://old.nabble.com/FileComponent-Camel-2.2-tp28154602p28162146.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
> 
> 

-- 
View this message in context: http://old.nabble.com/FileComponent-Camel-2.2-tp28154602p28162632.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message