Re: Dynamic origin file components?

2010-05-28 Thread Willem Jiang
You can consider to use split[1] to do this kind of job. [1]http://camel.apache.org/splitter.html Willem Mattias Severson wrote: That seems like a neat solution. :-) Question: Is it possible to send several files to one receiver in a similar way (e.g. by providing a Collection as body)? Natura

Re: Camel FTP is not responding and returning code 0 as connectiontime out

2010-05-28 Thread Willem Jiang
The NPE is caused by we can't set the soTimeout before the FtpClient connecting the server. How about set the option of defaultTimeout ? Here is great blog[1] which discuss about it. [1]http://sudhirvn.blogspot.com/2007/05/ftpclient-timeout-values.html Willem Srini97 wrote: The following is

Re: Dynamic origin file components?

2010-05-28 Thread Mattias Severson
That seems like a neat solution. :-) Question: Is it possible to send several files to one receiver in a similar way (e.g. by providing a Collection as body)? Naturally, I can iterate over the file collection and send the files one by one, but I guess that the performance would be better if all f

Re: Problems shutting down route onCompletion

2010-05-28 Thread ankelee
But even so, shouldn't onCompletion first do it's work when the route was actually completely done with everything? -- View this message in context: http://old.nabble.com/Problems-shutting-down-route-onCompletion-tp28707903p28708542.html Sent from the Camel - Users mailing list archive at Nabble

Re: Handling map in the concurrentConsumers

2010-05-28 Thread Claus Ibsen
Hi If you use for example Spring and use its to IoC the beans you can just set the scope to prototype. Which causes Spring to create a new instance on request. In pure Java you have to handle that yourself. On Fri, May 28, 2010 at 4:26 PM, Srini97 wrote: > > Hello all, > > I am using the conc

Re: Problems shutting down route onCompletion

2010-05-28 Thread ankelee
Just to clear things up if anyone else should read this. On page 378 it is shown that you can use .shutdownRoute() instead of .stopRoute(). shutdownRoute() shuts down gracefully and hence waits the entire batch to complete before shutting down the route. This change should in this case then be im

Re: Camel FTP is not responding and returning code 0 as connectiontime out

2010-05-28 Thread Srini97
The following is the entire stack trace of the NPE wheI tried to soTimeout option [2010-05-28 16:25:37,554][DefaultMessageListenerContainer-1][ERROR][org.apache.camel.component.jms.EndpointMessageLis tener][] Caused by: [org.apache.camel.FailedToCreateProduc

Re: Problems shutting down route onCompletion

2010-05-28 Thread ankelee
Hi Perfect :-) Claus Ibsen-2 wrote: > > Hi > > Read further and see page 378 > > > On Fri, May 28, 2010 at 4:51 PM, ankelee wrote: >> >> Hi >> >> I'm trying to do a use case similar to the one on page 371 in Camel in >> Action. >> I need to start a route. Copy a batch of files from FTP, a

Re: Problems shutting down route onCompletion

2010-05-28 Thread Claus Ibsen
Hi Read further and see page 378 On Fri, May 28, 2010 at 4:51 PM, ankelee wrote: > > Hi > > I'm trying to do a use case similar to the one on page 371 in Camel in > Action. > I need to start a route. Copy a batch of files from FTP, and then shut it > down again. > > Pseudo Spring DSL: > > >  

Re: Camel FTP is not responding and returning code 0 as connectiontime out

2010-05-28 Thread Claus Ibsen
On Fri, May 28, 2010 at 4:33 PM, Srini97 wrote: > > I am using Camel2.3 and I tried to use soTimeout as well. But it throuing > Null pointer exception saying it is unable create producer. > Can you post the endpoint configuration and the stacktrace which causes this NPE. And how do you run Camel?

Re: Problems shutting down route onCompletion

2010-05-28 Thread ankelee
In addition to the case above, the last file does not get copied/moved, eventhough the debug window shows that it was copied. -- View this message in context: http://old.nabble.com/Problems-shutting-down-route-onCompletion-tp28707903p28707924.html Sent from the Camel - Users mailing list archiv

Problems shutting down route onCompletion

2010-05-28 Thread ankelee
Hi I'm trying to do a use case similar to the one on page 371 in Camel in Action. I need to start a route. Copy a batch of files from FTP, and then shut it down again. Pseudo Spring DSL: ${property.CamelBatchComplete} == true I check if the property set by BatchConsumers - Came

Re: Camel FTP is not responding and returning code 0 as connectiontime out

2010-05-28 Thread Srini97
I am using Camel2.3 and I tried to use soTimeout as well. But it throuing Null pointer exception saying it is create producer. Claus Ibsen-2 wrote: > > Hi > > Have you tried with ftpClient.soTimeout also? > > And what version of Camel are you using? > > > On Thu, May 27, 2010 at 2:06 PM

Handling map in the concurrentConsumers

2010-05-28 Thread Srini97
Hello all, I am using the concurrencyconsumers option in the routing. But I have create a Map which should be shared for thread in the consumer. can any body guide the sysntax for this . below is the code.. I wanted to use the following deliveryEndpoints map and myRetryBean as one per thread.

Re: Exception while trying to gracefully shutdown camel

2010-05-28 Thread Willem Jiang
Can you create a small test case and attached with a Camel JIRA[1]? In this way we can dig the issue more easily. [1] https://issues.apache.org/activemq/browse/CAMEL Willem vcheruvu wrote: I am using Spring 2.5.6. Claus Ibsen-2 wrote: Hi What version of Spring are you using? On Fri, May

Re: Exception while trying to gracefully shutdown camel

2010-05-28 Thread vcheruvu
I am using Spring 2.5.6. Claus Ibsen-2 wrote: > > Hi > > What version of Spring are you using? > > > > On Fri, May 28, 2010 at 11:34 AM, vcheruvu > wrote: >> >> K.. I have gone through Spring reference manual and looked at ways to >> control >> bean destroy. I tried using camelcontext id n

Re: Dynamic origin file components?

2010-05-28 Thread Claus Ibsen
Hi Its probably just much easier to create a java.io.File for the file name and then send that as a body to the given FTP endpoint. Then you do NOT need any camel routes at all. And the file will thus be kept as it was. ProducerTemplate template = ... File target = new File("the file name here")

Dynamic origin file components?

2010-05-28 Thread Mattias Severson
Is it possible to create file components dynamically? I have an interface that gives me File objects (after a physical file has been created on disk) that I would like to send to a remote FTP address. The files are created one at the time, in different folders and with different file names. The f

Re: release 2.3.0 XPathBuilder.xpath evaluate gives different result

2010-05-28 Thread Claus Ibsen
On Fri, May 28, 2010 at 12:39 PM, larsa wrote: > > Hi > > In release 2.3.0 given the following XML > > "cheese" > XPathBuilder.xpath("foo/bar").evaluate(exchange, String.class); > returns  "cheese" > > See test below. > Is this the correct behavior or a bug? > Yes its correct now. As you have sel

release 2.3.0 XPathBuilder.xpath evaluate gives different result

2010-05-28 Thread larsa
Hi In release 2.3.0 given the following XML "cheese" XPathBuilder.xpath("foo/bar").evaluate(exchange, String.class); returns "cheese" See test below. Is this the correct behavior or a bug? Regards Lars In Camel 2.2.0 the following test is true public void testXpath(){

Re: Exception while trying to gracefully shutdown camel

2010-05-28 Thread Claus Ibsen
Hi What version of Spring are you using? On Fri, May 28, 2010 at 11:34 AM, vcheruvu wrote: > > K.. I have gone through Spring reference manual and looked at ways to control > bean destroy. I tried using camelcontext id name defined in my config and > applied it to bean's depends-on attribute.

Re: camel aggregator

2010-05-28 Thread marcin80
Thanks Claus for your help. It works:) Cheers, Marcin -- View this message in context: http://old.nabble.com/camel-aggregator-tp28697161p28704802.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Exception while trying to gracefully shutdown camel

2010-05-28 Thread vcheruvu
K.. I have gone through Spring reference manual and looked at ways to control bean destroy. I tried using camelcontext id name defined in my config and applied it to bean's depends-on attribute. Unfortunately, spring cannot find my camelcontext id name. After some investigation, I came across th

Re: camel aggregator

2010-05-28 Thread Claus Ibsen
On Fri, May 28, 2010 at 10:57 AM, marcin80 wrote: > > Thanks Claus, > > I've changed my route > > >           >           >                 >                         >                 >         >       > > > Outside camel context I've defined bean > > > > whitch contains only one method: > > pu

Re: camel aggregator

2010-05-28 Thread marcin80
Thanks Claus, I've changed my route Outside camel context I've defined bean whitch contains only one method: public void test(Object o) { System.out.println(

Re: Websphere MQ ExchangeTimedOutException

2010-05-28 Thread Claus Ibsen
Hi You can set a custom JMSCorrelationID which is 24 chars or less. Just add it as a Camel Header. In the future you can plugin a different UUID generator and have one which comply with 24 chars or less. On Wed, May 26, 2010 at 3:46 PM, omarito wrote: > > Hi Claus, > > The MQ version that we a

Re: Method setExceptionListener not permitted in J2EE-Servers

2010-05-28 Thread Claus Ibsen
Hi How have you configured this bean, ibmmqvsl ? On Thu, May 27, 2010 at 7:14 PM, waterback wrote: > > Hi Claus, > > Thank you for responding > > by the way - hope you had a nice trip home from Frankfurt... > > How would i configure an exception listener explicitly on the MQ Endpoint? > or let