Re: http not cleaning up tmp files when exchange is stopped

2011-06-10 Thread Claus Ibsen
On Fri, Jun 10, 2011 at 9:43 PM, Jason Burkhardt wrote: > I dug into this a little further, here's the underlying behavior of the > HttpProducer: > The method doExtractResponseBodyAsStream in HttpProducer ends up creating a > CachedOutputStream based on the server response.  This ends up creating

Re: read all files in folder

2011-06-10 Thread boday
looks fine...that's why I mentioned using convertBodyTo(String.class) earlier...good luck fachhoch wrote: > > thank u very much , I also tried a simple approach it worked but not sure > if it is right please tell me if it is right , what I did is call > convertBodyTo(String.class) and I noti

Re: camel bindy exception

2011-06-10 Thread Taariq Levack
Hi Can I see your bindy annotations? On 10 Jun 2011, at 4:23 PM, sumatheja wrote: > Hi, > I'm using camel to read to csv file and persist the values to a database. > Given below is my route > > from("file:src/data?delay=1") > .unmarshal().bindy(BindyType.Csv, "com.avnet") >.proces

Remote Poll the Files and then launch a route

2011-06-10 Thread AnujK
Our use case actually calls for polling all remote files, and once the poll is complete - call another route. I am using the PollStrategy commit count to see if the count == 0 , implying that the files are now ftped over. Is this the right way to monitor all files are downloaded? How do I start a

Re: read all files in folder

2011-06-10 Thread fachhoch
thank u very much , I also tried a simple approach it worked but not sure if it is right please tell me if it is right , what I did is call convertBodyTo(String.class) and I noticed exchange has headers and it had file path filename and some other values so I just called get header Exchange.F

Re: read all files in folder

2011-06-10 Thread boday
alright, try this...convert to InputStream, then to byte[], then aggregate (as ArrayList), then to your processor... from("file:/tmp/inbox") .convertBodyTo(InputStream.class) .process(new Processor() { public void process(Exchange exchange) throws Exception

Re: read all files in folder

2011-06-10 Thread fachhoch
can adding a processor to from will help ? I did not try but want to know ur opinion I saw this in http://camel.apache.org/message-translator.html from("direct:start").process(new Processor() { public void process(Exchange exchange) { Message in = exchange.getIn(); in.setB

Re: read all files in folder

2011-06-10 Thread fachhoch
can I say convertBodyTo(new HashMap()) and in this hashmap I want to put the filename and its content can I do this ? -- View this message in context: http://camel.465427.n5.nabble.com/read-all-files-in-folder-tp4474104p4477436.html Sent from the Camel - Users mailing list archive at Nabble

Re: Camel 2.7.2 in ServiceMix 4.3.0

2011-06-10 Thread ychawla
Hi Jean Baptiste, Thanks for the advise. I made some progress. I updated org.apache.karaf.features.cfg with: mvn:org.apache.karaf/apache-karaf/2.1.5/xml/features mvn:org.apache.camel.karaf/apache-camel/2.7.2/xml/features Then I tried this: features:install camel-core 2.7.2 and got this error:

Re: read all files in folder

2011-06-10 Thread boday
To your first question...the issue is that your file consumer had a 60s delay and completionFromBatchConsumer() mode uses that as the delay...your other timeout used only 10s To your 2nd question, I couldn't get that to work either. Not sure if its a bug or just a limitation of trying to aggregat

Re: read all files in folder

2011-06-10 Thread fachhoch
I changed my router to use and removed delete , I was hoping at this time I will be able to read file bytes in my processor but its failing with java.io.FileNotFoundException public class MyRouteBuilder extends RouteBuilder { public void configure() { from("file://e:/u01/orac

Re: read all files in folder

2011-06-10 Thread fachhoch
I tried with .convertBodyTo(File.class) , I was able to get filename but when I tried to read the file to byte array I got IO exceptions , file does not exsists , obviously because I said the delete option to true , please advice me how to get file content as byte array ? -- View this messa

Re: read all files in folder

2011-06-10 Thread fachhoch
I tried your code It did not work here is my actual code public class MyRouteBuilder extends RouteBuilder { public void configure() { from("file://e:/u01/oracle/NEW_NEAR_FILES/?delete=true&delay=6") .convertBodyTo(File.class) /

Re: startupOrder() on a route

2011-06-10 Thread bvahdat
Somehow I still don't get it right, but maybe it's because of my poor english Let's consider the example you mentioned with A and B and equate them with the example in the book (page 416). In this case A would be the route with the Id "webservice" and B would be the one with the Id "update". Now

Re: http not cleaning up tmp files when exchange is stopped

2011-06-10 Thread Jason Burkhardt
I dug into this a little further, here's the underlying behavior of the HttpProducer: The method doExtractResponseBodyAsStream in HttpProducer ends up creating a CachedOutputStream based on the server response. This ends up creating a cos* temp file in java.io.tmpdir+/camel-tmp. These files are on

Re: Build break in camel-jetty

2011-06-10 Thread Jim Talbut
I think both the test in camel-jetty and the code in camel-http are wrong. In camel-http (DefaultHttpBinding) we have: protected void populateAttachments(HttpServletRequest request, HttpMessage message) { // check if there is multipart files, if so will put it into DataHandler

Re: read all files in folder

2011-06-10 Thread Taariq Levack
And change the getBody too. On 10 Jun 2011, at 7:23 PM, boday wrote: > just change .convertBodyTo(String.class) to .convertBodyTo(File.class) > > On Fri, Jun 10, 2011 at 10:19 AM, fachhoch [via Camel] < > ml-node+4476750-116871121-45...@n5.nabble.com> wrote: > >> Thanks for your reply I want t

Re: read all files in folder

2011-06-10 Thread boday
just change .convertBodyTo(String.class) to .convertBodyTo(File.class) On Fri, Jun 10, 2011 at 10:19 AM, fachhoch [via Camel] < ml-node+4476750-116871121-45...@n5.nabble.com> wrote: > Thanks for your reply I want to get them as files(java.io.File) not as > Strings I need each file name and its

Re: read all files in folder

2011-06-10 Thread fachhoch
Thanks for your reply I want to get them as files(java.io.File) not as Strings I need each file name and its content . -- View this message in context: http://camel.465427.n5.nabble.com/read-all-files-in-folder-tp4474104p4476750.html Sent from the Camel - Users mailing list archive at Nabble.c

Re: read all files in folder

2011-06-10 Thread boday
If you are using the aggregator with groupExchanges()...then you can get the exchanges like this... from("file:/tmp/inbox") .convertBodyTo(String.class) .aggregate(constant(true)).completionFromBatchConsumer().groupExchanges() .process(new Processor() {

Re: read all files in folder

2011-06-10 Thread fachhoch
Yes I used aggregator it gets valled once that uis good , what I mean is in my proccesor from exchange what should I call to get all files here is my code public static class FileProcessor implements Processor { @Override public void process(Exchange excha

Re: startupOrder() on a route

2011-06-10 Thread Claus Ibsen
You may at first think the shutdown should be reverse, but it should frankly not. However there is an option on ShutdownStrategy you can use to enable reverse. The idea with graceful shutdown is to stop intaking new messages. And then wait for existing messages to complete. Until there is 0 messag

Re: read all files in folder

2011-06-10 Thread Taariq Levack
Did you try the aggregator link sent before? Taariq On Fri, Jun 10, 2011 at 4:09 PM, fachhoch wrote: > Please tell me on how to get all files in my processor > > My processor gets exchange but I have no clue how to get all files from > exchange are there any examples? > > > > -- > View th

Mina Component

2011-06-10 Thread reekahdoh
Hello All, I am having problems making the Mina component work within my application. I am sending messages comprised of raw bytes, to a server over TCP. I have a simple java class that opens a socket and sends the bytes and the messages are received and processed fine. I also wrote a simple

Re: Splitter StopOnException doesn't forward the exception on the Exchange

2011-06-10 Thread gsilverman
I don't believe the AggregatorStrategy is the problem, but here is mine: public class DispensingAggregationStrategy implements AggregationStrategy{ public Exchange aggregate(Exchange oldExchange, Exchange newExchange) { if (oldExchange == null)

startupOrder() on a route

2011-06-10 Thread bvahdat
Hi, I've been already through the book "Camel in Action" which as James Strachan has already said, it really "kicks the ass!". One question regarding startupOrder() stuff on the page 426 at the bottom, it says: You then noticed that Camel stops this route as the first route during the shutdown p

camel bindy exception

2011-06-10 Thread sumatheja
Hi, I'm using camel to read to csv file and persist the values to a database. Given below is my route from("file:src/data?delay=1") .unmarshal().bindy(BindyType.Csv, "com.avnet") .process(myProcessor) .split(body()) .to("jpa:com.avnet.RenQuotaIFaceAll

Re: read all files in folder

2011-06-10 Thread fachhoch
Please tell me on how to get all files in my processor My processor gets exchange but I have no clue how to get all files from exchange are there any examples? -- View this message in context: http://camel.465427.n5.nabble.com/read-all-files-in-folder-tp4474104p4476258.html Sent from th

Re: check remote folder using ftp

2011-06-10 Thread fachhoch
I am getting this error org.apache.camel.component.file.GenericFileOperationFailedException: Cannot change directory to: NEW_NEAR_FILES at org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:408) at org.apache.camel.component.file.remote.

Re: Camle File transfer

2011-06-10 Thread davsclaus
The Camel file component uses the java.io.File API so whatever you can do with that is supported. - Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.m

Re: Deployment unit versioninfo

2011-06-10 Thread Claus Ibsen
Hi On Thu, Jun 9, 2011 at 8:39 PM, preben wrote: > Wouldn't it be a nice feature to have versioninfo from the deployment unit > (jar or war) being exposed via jmx, so you would be able to see which > versions currently is running on your system ? > I was thinking this could be a managed attribute

Re: Splitter StopOnException doesn't forward the exception on the Exchange

2011-06-10 Thread Claus Ibsen
I cannot reproduce this on trunk. What do you do in that custom aggregatorStrategy you do? On Wed, Jun 8, 2011 at 5:31 PM, gsilverman wrote: > I have the following route which uses stopOnException to catch exceptions: > > > >             parallelProcessing="true" stopOnException="true"> >    

Re: thinking in the difference between camel and servicemix

2011-06-10 Thread Ashwin Karpe
Hi, As Claus mentioned correctly the servicemix components are legacy components grounded in the JBI spec. They are also rather dated and no longer as useful since JBI spec is no longer being actively updated. The latest Servicemix container is OSGi based both still supports the legacy components.

Re: Error Handling on IMAP Component

2011-06-10 Thread Ashwin Karpe
Hi, Please check out the Exception Handling capability in Camel http://camel.apache.org/exception-clause.html http://camel.apache.org/exception-clause.html Cheers, Ashwin... - - Ashwin Karpe Apache Camel Committer & Sr Principal Consu

Re: Camel CXF & WS-Security

2011-06-10 Thread Willem Jiang
Hi Mark, I'm afraid you can just configure the WSS4jInInterceptor through the cxf:bean:xxx , current camel-cxf doesn't support to configure it through URI. On 6/10/11 2:46 PM, Mark Borner wrote: Thanks for that. Is there anyway to add the WSS4JInInterceptorto the endpoint if I'm using cxf:

Re: Camel CXF & WS-Security

2011-06-10 Thread Charles Moulliard
I don't think that you can provide this property as a parameter in cxf://someAddress? WSS4JInInterceptor=. It must be declarer as you can see in my example using spring bean. On Fri, Jun 10, 2011 at 8:46 AM, Mark Borner wrote: > > Thanks for that. > > Is there anyway to add the WSS4JInInterce