Preventing reading of a large XML file in memory

2012-07-16 Thread vishal1981
Hi, I am using Camel to transfer a file from my app server to an FTP server before converting it to a different format. The incoming file can be potentially huge (60 to 100 gbs) in size and I want to prevent Camel from reading the whole file in memory. I would like to call a bean which takes the

Re: camel+quartz schedulers

2012-07-16 Thread Sudhakar.kaithepalli
Hi... How to get file size, which is there in ftp server using camel Exchange? - Sudhakar Kaithepalli -- View this message in context: http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716063.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Preventing reading of a large XML file in memory

2012-07-16 Thread Claus Ibsen
Hi Use the localWorkDirectory option on the JMS endpoint to stream directly to a file when downloading the ftp file. Then the message body is a GenericFile type (also a org.apache.camel.WrappedFile from Camel 2.9 onwards) where you can access the file using a stream etc. So if you want to from

Re: Welcome to my blog mainly about Apache Camel

2012-07-16 Thread Claus Ibsen
Hi Nice blog post. I added a link to it from our link collection, and posted a tweet as well. Keep up the good blogs, and keep have fun riding the Camel. On Sun, Jul 15, 2012 at 3:43 PM, michal.warecki michal.ware...@gmail.com wrote: Check out my new article about EIP and Camel:

Re: camel+quartz schedulers

2012-07-16 Thread Pontus Ullgren
Hello, The file size is available in the message headers (CamelFileLength). See http://camel.apache.org/file2.html // Pontus On Mon, Jul 16, 2012 at 8:25 AM, Sudhakar.kaithepalli sudhakar.kaithepa...@gmail.com wrote: Hi... How to get file size, which is there in ftp server using camel

File Component: Rename an existing file

2012-07-16 Thread santoshjoshi
Environment: Camel :2.8.1 Java : jdk 6 The default behaviour of Camel file component is to Override an existing file: Below are the options the applies when a file already exists public enum GenericFileExist { Override, Append, Fail, Ignore } I would like to have an option like where an

Re: Splitting, processing and aggregating a list

2012-07-16 Thread ben1729
For anyone who finds this in future, this did the trick for me: from(REQUEST_QUEUE_ENDPOINT) .split(body(), new AggregationStrategy() { public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {

Re: Usage of Scala DSL

2012-07-16 Thread Andreas Feldmann
Hey Claus, thanks a lot for the answer! It's working pretty well with the pipeline: seda:test == transform(_.in.toString().toUpperCase()) == multicast.parallel { pipeline {transform(_.in[String] + Test 1) log(LoggingLevel.INFO, TEST, ${body})} pipeline {transform(_.in[String] + Test 2)

Re: soap over jms

2012-07-16 Thread bhushand
Hi Christian Thanks for sharing the link. I tried the example but getting org.apache.cxf.BusException: No binding factory for namespace http://schemas.xmlsoap.org/wsdl/soap/ registered. When I searched for this issue ,I came to know that I have to add camel-cxf-transport

Re: Forward mail via camel

2012-07-16 Thread pvunckx
Hi Charles, Hi Willem, It's a HTML mail with or without attachments. This is the stacktrace: 2012-07-16 16:46:44,972 [/imap.gmail.com] DEBUG DefaultComponent --- Creating endpoint uri=[smtp://195.238.5.128?to=abc%40xyz.be], path=[195.238.5.128],

Re: Preventing reading of a large XML file in memory

2012-07-16 Thread vishal1981
Thanks for the reply. So is it compulsory to use a JMS Endpoint to prevent Camel from reading the whole message in memory? What is to my bean I dont pass the message body as a parameter but just then filename? Will that prevent Camel from loading the whole message in memory before calling my bean

Re: Move file when message received

2012-07-16 Thread RobO
I was hoping I could accomplish this without a bean but thanks for your response. I will use the bean. -- View this message in context: http://camel.465427.n5.nabble.com/Move-file-when-message-received-tp5715968p5716084.html Sent from the Camel - Users mailing list archive at Nabble.com.

Multicast question

2012-07-16 Thread PhilBurress
Why isn't the original in body of an exchange passed to a route under a multicast? e.g.: The original in body in those subroutes ends up being the in body at the point the multicast is triggered. Is there anyway around this? We need to keep the original exchange in body as it was from the

Re: Multicast question

2012-07-16 Thread PhilBurress
By the way, we are stuck on Camel 2.6. I see that there is a callback to do this in 2.8. -- View this message in context: http://camel.465427.n5.nabble.com/Multicast-question-tp5716086p5716087.html Sent from the Camel - Users mailing list archive at Nabble.com.

How to deploy Camel to EJB / J2EE container?

2012-07-16 Thread Charles
I have some Camel routes interacting with a 3rd EJB-based app.  Currently this is accomplished by  acquiring a JMS topic via JNDI and starting the Camel context in a separate VM instance,  i.e. running Camel as a regular Java application.  This is not really convenient - I'd like to  package up

Re: How to deploy Camel to EJB / J2EE container?

2012-07-16 Thread Romain Manni-Bucau
Hi, typically in J2EE or JEE without spring you use standalone like app: create you context manually and manage its lifecycle. You speak about J2EE so i guess you don't have CDI but as a side note with CDI there are some project taking it into account. Personnally i used a servletcontextlistener

Re: How to deploy Camel to EJB / J2EE container?

2012-07-16 Thread Charles
Romain, If you're using a ServletContextListener, it sounds like you're deploying your Camel app in a web app.  As for CDI, a/k/a JSR-299, I have not heard of that before but upon looking, it just seems like a JSRized implementation of Spring Framework.   I was asking about deployment to J2EE

Re: Preventing reading of a large XML file in memory

2012-07-16 Thread Claus Ibsen
Sorry it was the ftp endpoint i meant On Monday, July 16, 2012, vishal1981 wrote: Thanks for the reply. So is it compulsory to use a JMS Endpoint to prevent Camel from reading the whole message in memory? What is to my bean I dont pass the message body as a parameter but just then

Cannot use fileName property for path extension

2012-07-16 Thread edvicif
Hi! I wanted to use poll enrich to pick up different files from host, based on the path and filename. I was thinking to have something like: file:/?fileName=${in.body} Where body is an absolute path of the file. I wasn't able to make it work. I've created a unit test, where I set up three file.

Re: Can I cancel a Route suspension.

2012-07-16 Thread smadarapu
Hi Claus That's what I did, but I needed to persist some information elsewhere to know that I need to resume the route. After the suspension is done I am reading a flag I set in the database that tell if i need to resume the route. Thanks again. -- View this message in context:

Re: Exception handling in Camel Routes.

2012-07-16 Thread smadarapu
Hi Christian, If you read my initial post, my question is what am I missing. I had what you suggested but its not working. Christian Mueller wrote It's documented here [1]. You can e.g. do: from(direct:start)

Compound Predicate For Camel Route

2012-07-16 Thread Gary Liu
Hello, I need to put AND log into my spring based xml. Here is the snappit: when descriptionTransaction Imports/description simple${in.header.CamelHttpPath} contains '/trans/Inventory/'/simple AND simple${in.header.CamelHttpMethod}

Re: Multicast question

2012-07-16 Thread Claus Ibsen
Hi You can store whatever information you want as exchange properties, and refer to them at any time. So you can for example copy the input message and store it as an exchange. And then get it back from your sub routes. On Mon, Jul 16, 2012 at 6:07 PM, PhilBurress nmclough...@amig.com wrote:

Re: File Component: Rename an existing file

2012-07-16 Thread Claus Ibsen
Hi I actually don't think this would be possible. I don't recall we have a hook to allow a custom plugin on the producer side, to eg as you want, to rename the existing file beforehand. We could possible introduce an out of the box solution with a new enum: MoveExisting And then have a new

Re: Cannot use fileName property for path extension

2012-07-16 Thread Claus Ibsen
Hi PollEnrich does not currently support dynamic uris with details from the current Exchange. We did put that in a red warning box at its eip documentation for pollEnrich http://camel.apache.org/content-enricher.html There is a JIRA ticket to improve this in the future. No later than Camel 3.0,

Re: Testing Restlet endpoints after refactoring to using servlet container

2012-07-16 Thread Magnus Palmér
Hi, Yes, I was thinking about that as well. But since I only need it when I run unit tests I decided to mock the URI.getHost, URI.getPort and URI.getScheme instead using PowerMock and Mockito. import static org.powermock.api.support.membermodification.MemberMatcher.method; import static

Question about loadbalancing failover

2012-07-16 Thread Miguel Ruiz Velasco Sobrino
Hello, I'm fairly new to camel, and I have a problem. I already have a camel configuration with loadbalancing and failover, and it works wonders when at least one of the processors succeeds. I have an scenario maybe all processors fail, and camel loops infinitely doing the failover. I need to

Re: soap over jms

2012-07-16 Thread Willem Jiang
It looks you are heading the right direction when we got this kind of issue. BTW, as you are using low version of CXF, did you have any chance to try to newer one? On Mon Jul 16 20:53:34 2012, bhushand wrote: Hi Christian Thanks for sharing the link. I tried the example but getting

RE: Preventing reading of a large XML file in memory

2012-07-16 Thread vishal1981
Thanks. I read about the working directory and thats exactly what I was looking for. thank you. Yet to try it though. However, what if I want the same behaviour for File. i.e. File -Bean (no FTP). I dont want the file component to read the whole file just pass along the file path to the bean?

Re: Compound Predicate For Camel Route

2012-07-16 Thread Gary Liu
Thanks Claus. It works. As we are using 2.8 Camel, I use and like this: simple${in.header.CamelHttpMethod} != 'DELETE' and ${in.header.CamelHttpPath} contains '/trans/WorkOrder'/simple Thanks --Gary -- View this message in context:

Re: Preventing reading of a large XML file in memory

2012-07-16 Thread Claus Ibsen
On Tue, Jul 17, 2012 at 6:18 AM, vishal1981 vishal.changr...@ericsson.com wrote: Thanks. I read about the working directory and thats exactly what I was looking for. thank you. Yet to try it though. However, what if I want the same behaviour for File. i.e. File -Bean (no FTP). I dont want

RE: Preventing reading of a large XML file in memory

2012-07-16 Thread vishal1981
Thanks again. I am using something like the following, from(file...).to(ejb:cms/CamelToPluginAdaptor/local?method=process(${header.CamelFileAbsolutePath},${properties:outbox}/${header.PROVIDER_ID}.xml,${header.PROVIDER_ID}) Where cms/CamelToPluginAdaptor /local is my EJB. Will that prevent

Re: Question about loadbalancing failover

2012-07-16 Thread Claus Ibsen
On Tue, Jul 17, 2012 at 2:17 AM, Miguel Ruiz Velasco Sobrino miguel...@fcm.com.mx wrote: Hello, I'm fairly new to camel, and I have a problem. I already have a camel configuration with loadbalancing and failover, and it works wonders when at least one of the processors succeeds. I have an

Re: Preventing reading of a large XML file in memory

2012-07-16 Thread Claus Ibsen
On Tue, Jul 17, 2012 at 6:47 AM, vishal1981 vishal.changr...@ericsson.com wrote: Thanks again. I am using something like the following,

RE: Preventing reading of a large XML file in memory

2012-07-16 Thread vishal1981
sweet..thanks a ton! From: Claus Ibsen-2 [via Camel] [mailto:ml-node+s465427n5716143...@n5.nabble.com] Sent: Tuesday, July 17, 2012 1:10 AM To: Vishal Changrani Subject: Re: Preventing reading of a large XML file in memory On Tue, Jul 17, 2012 at 6:47 AM,

Re: soap over jms

2012-07-16 Thread bhushand
Hi Willem I tried for newer version of cxf(I tried 2.4.8, because I read somewhere it was issue in older version of cxf fixed in 2.3.x). But now it is giving new exception org.springframework.beans.factory.BeanCreationException: Error creating bean with name