Re: camel-ftp and crontab

2010-11-26 Thread jmh
Thanks a lot, your solution sounds better and cleaner than mine ;-) J-M -- View this message in context: http://camel.465427.n5.nabble.com/camel-ftp-and-crontab-tp3280671p3280980.html Sent from the Camel - Users mailing list archive at Nabble.com.

ScheduledRoutePolicy is not available in camel 2.4

2010-11-26 Thread jmh
That sounds great...for later ! because ScheduledRoutePolicy is available in Camel 2.6 and for now I'm using camel 2.4 :-( -- View this message in context: http://camel.465427.n5.nabble.com/camel-ftp-and-crontab-tp3280671p3281006.html Sent from the Camel - Users mailing list archive at Nab

Re: SFTP file retrieval does not seem to work but no exception

2010-11-26 Thread Claus Ibsen
Hi Enable DEBUG/TRACE logging to see more details. What Camel version are you using? Consider try using the latest release. On Fri, Nov 26, 2010 at 8:41 AM, manoj.sahu wrote: > > Hi - > I am trying to get a file from a remote sftp server.  It does not give me > any exception but does not wor

Throwing exceptions from Enrichers

2010-11-26 Thread Glen Robson
Hi, I was wondering what the best way to throw an exception from an aggregator is so I can catch it in the camel route. Currently I have the following route: http://localhost:/ethos/upload/$ {header.llgc_ethos_oai_harvest_location

Re: Some questions of camel's jta transaction support

2010-11-26 Thread Claus Ibsen
Hi Camel in Action chapter 9 really covers transaction and compensations really well. On Fri, Nov 26, 2010 at 6:06 AM, ext2 wrote: > 1: Could the from-endpoint decide how to do the post-action  according to > following  route's transaction result(rollback/commit)? > >  Fo example : >        fro

Re: Throwing exceptions from Enrichers

2010-11-26 Thread Claus Ibsen
On Fri, Nov 26, 2010 at 9:48 AM, Glen Robson wrote: > Hi, > > I was wondering what the best way to throw an exception from an aggregator > is so I can catch it in the camel route. Currently I have the following > route: > > >             >             >             > >  http://localhost:/etho

Re: Throwing exceptions from Enrichers

2010-11-26 Thread Glen Robson
On 26 Nov 2010, at 08:54, Claus Ibsen wrote: On Fri, Nov 26, 2010 at 9:48 AM, Glen Robson wrote: Hi, I was wondering what the best way to throw an exception from an aggregator is so I can catch it in the camel route. Currently I have the following route:

Create an empty .done file when file upload on a ftp

2010-11-26 Thread florent andré
Hi all, newbie here ! My usecase is : - upload files on an ftp (file1.txt, file2.txt,...) - for each uploaded file, create an *empty* {fileName}.done file on the ftp server. I try this configuration add some variants, but nothing good from("file:test-files?noop=true"). to("ftp://goodconfig"

Re: Create an empty .done file when file upload on a ftp

2010-11-26 Thread Claus Ibsen
Hi We do have a ticket in JIRA to supports this out of the box as a configuration on the fil/ftp endpoint. What you can do is to send an empty message to the ftp endpoint after the first file has been uploaded. from(file) .to(ftp) .setBody(constant("")) // set empty body to use for the

Re: camel-ftp and crontab

2010-11-26 Thread Ashwin Karpe
Ah, if you are using version 2.4, I do not see any issue with the route structure you have detailed. It should work. Cheers, Ashwin... - - Ashwin Karpe Apache Camel Committer & Sr Principal Consultant FUSESource (a Progress Software C

Re: Create an empty .done file when file upload on a ftp

2010-11-26 Thread Claus Ibsen
Hi I found the old ticket and created a new ticket for the producer side also https://issues.apache.org/activemq/browse/CAMEL-3369 On Fri, Nov 26, 2010 at 1:47 PM, Claus Ibsen wrote: > Hi > > We do have a ticket in JIRA to supports this out of the box as a > configuration on the fil/ftp endpoint

Re: JAXB causing Unit Test Failure without any actual marshalling active

2010-11-26 Thread enalposi
Oh, I wasn't aware 2.5 is out. We are on 2.4 still. I don't think I'll get to a test project any time soon as I'm currently working through holidays to meet deadlines (although having been informed it is considered treason to work on Thanksgiving in the US). The workaround and my preference is a

How to improve robustness of my routes?

2010-11-26 Thread Andreas A.
Hi I have an application that simply put does this: Ingoing: 1 - Fetch file from FTP->Local directory. 2 - Read file from Local directory, transform and split the file into several messages and deliver to JMS queue. Outgoing: 1 - Fetch messages from JMS queue as they are produced, transform and

Re: How to improve robustness of my routes?

2010-11-26 Thread Claus Straube
Hi, I think you can do this using a idempotent repository: http://camel.apache.org/idempotent-consumer.html from("ftp:foo") .split(body().tokenize("\n") .idempotentConsumer(header("myMessageId"),MemoryIdempotentRepository.memoryIdempotentRepository(200)) .to("jms:bar"); in your case the memor

How to get the Camel Registry in the oSGI environment ?

2010-11-26 Thread Tarun Ramakrishna
Hi all, How does one access the Camel registry in an oSGI environment ? (i.e. instance of org.apache.camel.spi.Registry that holds all the component registrations made by bundles, etc). Also what is the purpose of the 'camel-osgi' jar ? It doesn't seem to be necessary since there is an extender in

Re: How to get the Camel Registry in the oSGI environment ?

2010-11-26 Thread Claus Ibsen
camel-osgi JAR is obsolete from Camel 2.4 onwards and not included in the kit anymore. On Fri, Nov 26, 2010 at 2:38 PM, Tarun Ramakrishna wrote: > Hi all, > > How does one access the Camel registry in an oSGI environment ? (i.e. > instance of org.apache.camel.spi.Registry that holds all the com

Re: How to improve robustness of my routes?

2010-11-26 Thread Andreas A.
Hi That could be useful, although I'd rather like the "all or nothing" style of a transaction since I would always know that if a file is placed somewhere, it has either been consumed or not, and not maybe half consumed. The end result would be similar, but with the idempotent solution there's no

Re: How to improve robustness of my routes?

2010-11-26 Thread Claus Ibsen
Yeah JMS can use transaction, see the transactional client EIP pattern, and/or chapter 9 in the Camel book. The aggregator is a stateful EIP pattern and thus you need to use a persistent store or something like that to avoid lossing the in memory currently being aggregated messages. See the camel-

Re: How to improve robustness of my routes?

2010-11-26 Thread Andreas A.
"Yeah JMS can use transaction, see the transactional client EIP pattern, and/or chapter 9 in the Camel book. " Yeah I've read both, but will it work both ways? Just to be clear: In: Will the message(s) delivered to JMS be rolled back on exception? Out: Will the message(s) taken from JMS

Re: JAXB causing Unit Test Failure without any actual marshalling active

2010-11-26 Thread Willem Jiang
Can you create a JIRA and send us a simple test case? That will be quick for us to fix the issue. On 11/26/10 9:14 PM, enalposi wrote: Oh, I wasn't aware 2.5 is out. We are on 2.4 still. I don't think I'll get to a test project any time soon as I'm currently working through holidays to meet de

Re: How to improve robustness of my routes?

2010-11-26 Thread Claus Ibsen
Why dont you ask the computer! Always build unit tests which test this for your application. And yes it ought to be possible as its the idea with the transaction as its "all or nothing". On Fri, Nov 26, 2010 at 3:23 PM, Andreas A. wrote: > > "Yeah JMS can use transaction, see the transactional

Re: How to get the Camel Registry in the oSGI environment ?

2010-11-26 Thread Willem Jiang
On 11/26/10 9:38 PM, Tarun Ramakrishna wrote: Hi all, How does one access the Camel registry in an oSGI environment ? (i.e. instance of org.apache.camel.spi.Registry that holds all the component registrations made by bundles, etc). I do not understand why are your asking this question. You can

onCompletion for failed exchanges

2010-11-26 Thread Bengt Rodehav
I'm currently implementing a message history store. I use onCompletion to trigger when to store message details in my store. One piece of critical information is whether the exchange was successful or not. To determine this I call the isFailed() method on the exchange but this never seem to evaluat

Re: onCompletion for failed exchanges

2010-11-26 Thread Claus Ibsen
You use the moveFailed option on the file component which means it handles the failures and mark the Exchange is completed. On Fri, Nov 26, 2010 at 3:31 PM, Bengt Rodehav wrote: > I'm currently implementing a message history store. I use onCompletion to > trigger when to store message details i

Re: How to improve robustness of my routes?

2010-11-26 Thread Andreas A.
I will ask the computer now! but it was easier to ask you than setting up and configuring transaction managers etc. :) -- View this message in context: http://camel.465427.n5.nabble.com/How-to-improve-robustness-of-my-routes-tp3281265p3281392.html Sent from the Camel - Users mailing list archive

Re: onCompletion for failed exchanges

2010-11-26 Thread Bengt Rodehav
OK, I think I understand the problem. Do you have any suggestions as to how I can keep using moveFailed but determine in onCompletion that this was done? Actually, I also do the following: *onException(Exception.class)* * .maximumRedeliveries(mMaxRedeliveryAttempts)* * .delayPattern(mDelayPat

Re: How to get the Camel Registry in the oSGI environment ?

2010-11-26 Thread Tarun Ramakrishna
Hi Claus, Willem, Thanks for your answers! I had thought the Registry might be bound as an oSGI service somewhere too..but missed the fact that one can use any bound CamelContext and call getRegistry() on the same. Thanks! Tarun

Re: onCompletion for failed exchanges

2010-11-26 Thread Andreas A.
Hi You could do onCompletion().onFailureOnly() and in the same route as you do the message history route the message to your error destination. This of course also means that you have to remove the "moveFailed" option. from("file:in?move=archive/${date:now:MMdd}/${file:name}") .onCompletion

Re: test

2010-11-26 Thread Donald Whytock
Multiple-choice or essay? On Thu, Nov 25, 2010 at 5:38 PM, jmh wrote: > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/test-tp3280678p3280678.html > Sent from the Camel - Users mailing list archive at Nabble.com. >

Re: onCompletion for failed exchanges

2010-11-26 Thread Bengt Rodehav
I tried the following approach: - In my onException processor I set a custom property indicating that the exchange has failed. - In my onCompletion processor I regard the exchange as failed if theExchange.isFailed() OR my custom property is true. This seems to do the trick. Are there any gaps I h

Re: Some questions of camel's jta transaction support

2010-11-26 Thread ext2
Thanks Clause: > Check the book as it has such an example, where you can decide that > the inner should rollback, but the outer should still commit. > Camel got some options for that, such as rollbackLocalOnly() I have tried the books sample , but if I configured the inner transaction 's route as

Re: How to improve robustness of my routes?

2010-11-26 Thread Donald Whytock
Beginner trying to understand here...Could this have been done as from("ftp:foo") .split(body().tokenize("\n")) .groupExchanges() .process(new DumpToJmsProcessor("jms:bar")) which, granted, involves coding DumpToJmsProcessor; but on the other hand, would a failure result in rolling back the file

Re: SFTP file retrieval does not seem to work but no exception

2010-11-26 Thread manoj.sahu
Thank you for attention Claus! I had switched on trace : log4j.logger.org.apache.camel=TRACE I did not get any further logging. I am 2.5.0 version. 11:06:23,873 DEBUG SpringCamelContext:94 - onApplicationEvent: 11:06:23,873 TRACE SpringCamelContext:206 - Ignoring maybeStart() as Apache Camel

Re: Some questions of camel's jta transaction support(failed to try the nested transaction)

2010-11-26 Thread ext2
I have post the failure testCase as a JIRA: https://issues.apache.org/activemq/browse/CAMEL-3371 Thanks Clause: > Check the book as it has such an example, where you can decide that > the inner should rollback, but the outer should still commit. > Camel got some options for that, such as rollba

Re: DefaultShutdownStrategy can't shutdown DefaultErrorHandler's retries?

2010-11-26 Thread Lorrin Nelson
Great, thanks Claus! I've been thinking about your response. Although our volume is low and we can probably get away with it, I appreciate your point that long retries create the risk of big memory usage spikes as things pile up. Also I imagine it might make it a little difficult to ascertain t