camel mail imap :javax.mail.FolderClosedException

2011-09-12 Thread kevin707
Hi, We are using imap to consume mail with route: from("imap://username@host?password=pass&consumer.delay=5000&unseen=true&fetchSize=100&delete=true").process(new OrderQueryProcessor()).to("seda:email_process") private class OrderQueryProcessor implements Processor { public void process(Exc

Re: Calling shell script from Camel

2011-09-12 Thread boday
yep, you should be able to call a shell script directly like this... jeevan.koteshwara wrote: > > Hi, > I have a requirement, where I need to call a shell script (for zipping > and unzipping files with associated passwords if any) from the route. > > I have chosen exec component to do so. I

Re: No consumers available for direct endpoint on start.

2011-09-12 Thread boday
try specifying an explicit http://camel.apache.org/configuring-route-startup-ordering-and-autostartup.html startup order to your routes to make sure the direct consumer route is started prior to the route that reads from the queue... bbuzzard wrote: > > I'm receiving files from an ActiveMQ que

Re: Global onCompletion

2011-09-12 Thread boday
one way to do this is to use the http://camel.apache.org/aggregator2.html aggregator 's completionFromBatchConsumer mode. This will allow you to group exchanges together based on the size of the file batch, etc... from("file:inbound?maxMessagesPerPoll=20") .process(...) .aggregator(constant(true

No consumers available for direct endpoint on start.

2011-09-12 Thread bbuzzard
I'm receiving files from an ActiveMQ queue, directing the files to a direct endpoint which in turns sends the files back to a output ActiveMQ queue. This works great and I haven't had problems until last Friday when I made a modification to the camel.xml file. When I restarted ActiveMQ I checked

Re: Global onCompletion

2011-09-12 Thread Donald Whytock
I believe OnCompletion is called on each exchange. One file should be one exchange, so each file would generate a call to OnCompletion. If polling is restricted to 20 files at a time, that should still be 20 exchanges, resulting in 20 calls to OnCompletion. Don On Mon, Sep 12, 2011 at 10:45 AM,

Global onCompletion

2011-09-12 Thread OrackBahama
Hi, although I've read several posts for this, I'm quite unsure if the "onCompletion" construct will fit my needs. As far as I've understood, this is a hook that's called after completion of the route (when defined in front of the "from" ...). I'll explain my problem in the following example. I

Re: Bindy component: more than one model object per package

2011-09-12 Thread Claus Ibsen
On Mon, Sep 12, 2011 at 9:52 AM, c.spiegel wrote: > > Claus Ibsen-2 wrote: >> >> So you can have multiple model objects in the same package, and then >> just pin point the "main" class in the DataFormat. >> For example as JAXB works. >> > > Will this feature be included in future releases or is th

Calling shell script from Camel

2011-09-12 Thread jeevan.koteshwara
Hi, I have a requirement, where I need to call a shell script (for zipping and unzipping files with associated passwords if any) from the route. I have chosen exec component to do so. I have seen exec:java or exec:perl to execute respective java or perl files/scripts. Is there any direct way t

Re: XML Namespace and Xpath injection

2011-09-12 Thread Claus Ibsen
The @XPath annotation has an attribute to set namespaces. There is an example in Camel in Action book p118 On Mon, Sep 12, 2011 at 2:21 PM, wrote: > Hello, > I'm trying to inject a value in bean trough an xpath injection as following : > > >        public void audit(@XPath("/Envelope/Body/getT

Re: [ camel ] XML Namespace and Xpath injection

2011-09-12 Thread Marcin Cylke
On 09/12/2011 02:21 PM, atouret.nos...@free.fr wrote: Hello, I'm trying to inject a value in bean trough an xpath injection as following : public void audit(@XPath("/Envelope/Body/getToken/username/text()") String id, @Body String body) { logger.info("Id :"+id );

Re: Missing properties on exception

2011-09-12 Thread Claus Ibsen
Hi You can try storing that JMSCorrelationID as a property directly on the Exchange instead of the Message. Then it ought to be kept safe. exchange.setProperty("xxx", value); On Tue, Sep 6, 2011 at 6:25 PM, pkleczka wrote: > Hello > > *Problem*: When an incoming message arrives in my queue, I

Re: Bindy component: more than one model object per package

2011-09-12 Thread c.spiegel
Claus Ibsen-2 wrote: > > So you can have multiple model objects in the same package, and then > just pin point the "main" class in the DataFormat. > For example as JAXB works. > Will this feature be included in future releases or is this still possible? -- View this message in context: http:/

Re: unmarshal(CsvDataFormat). different behavior for one or multiples lines.

2011-09-12 Thread Claus Ibsen
Hi I have created a ticket https://issues.apache.org/jira/browse/CAMEL-4440 On Thu, Sep 8, 2011 at 8:20 AM, Claus Ibsen wrote: > On Wed, Sep 7, 2011 at 4:57 PM, dportabella > wrote: >> unmarshal(CsvDataFormat) produces a List>, >> however, it the CSV file has only one line, it pro

Re: wiretap and doTry / doCatch

2011-09-12 Thread Claus Ibsen
On Mon, Sep 12, 2011 at 9:04 AM, Damian Harvey wrote: > Hi all, > > As far as I can see wiretap() can't be used with doCatch() as it returns a > WireTapDefinition rather than a TryDefinition when inside a > doTry(). > > Is this intentional? Is the idea to use the new endDoTry()  in a situation

Re: Bindy component: more than one model object per package

2011-09-12 Thread Claus Ibsen
Hi We would like to improve this in the future, either Camel 3.0, or earlier. However we would like to avoid any big breakings and thus we need to be a bit careful on the 2.x branch. For 3.0 we can of course make bigger changes if it is indeed needed. So you can have multiple model objects in the

wiretap and doTry / doCatch

2011-09-12 Thread Damian Harvey
Hi all, As far as I can see wiretap() can't be used with doCatch() as it returns a WireTapDefinition rather than a TryDefinition when inside a doTry(). Is this intentional? Is the idea to use the new endDoTry() in a situation like this? (I'm using 2.8) Thanks, Damian.

Bindy component: more than one model object per package

2011-09-12 Thread c.spiegel
Is there any way, to tell Camel which model object to use during CSV unmarshalling? Following szenario: my.package: -ModelObject1 (annotated with @CsvRecord) -ModelObject2 (annotated with @CsvRecord) Both model object are totally different. I'm trying to poll a folder which includes differe