RE: Custom Idempotent Jdbc repository + Using lastmodified time

2012-09-17 Thread Siano, Stephan
There are actually two potential usages for idempotent repositories in conjunction with (S)FTP endpoints: usage in the endpoint itself or with an idempotent consumer in the pipeline (as you describe). If you have the idempotent repository directly in the endpoint this has the advantage that it

Re: Dynamic variable in Camel

2012-09-17 Thread Elezabeth
Hi , I tried the way u suggested , but still it is not working .. While searching I came across a link in which it is mentioned that for *PollEnrich* , the ${ } is not working... This is the link : https://issues.apache.org/jira/browse/CAMEL-4596 Can you suggest any other way? Thanks in adv

String replacement via Spring

2012-09-17 Thread gramanero
Is it possible to replace characters in a string via Spring DSL? I have a file path and want to send that path to a resful service in the body; however slashes in the path are preventing the packet from making it to the restful service. If I escape the slashes, then the call works just fine. I need

Re: Custom Idempotent Jdbc repository + Using lastmodified time

2012-09-17 Thread Christian Müller
Checkout: http://camel.apache.org/idempotent-consumer.html and http://camel.apache.org/simple.html Instead of from("direct:a") .idempotentConsumer(header("myMessageId"), ... try something like from("direct:a") .idempotentConsumer(simple("${header.CamelFileNameOnly}-${header.CamelFileLastModi

Re: Distributed transaction in camel route

2012-09-17 Thread Christian Müller
I updated my sample project with a new sample test for "compensation transaction": https://github.com/muellerc/camel-in-transaction/blob/master/src/test/java/org/apache/cmueller/camel/samples/camelone/tx/JmsAndJdbcCompensationTransactionSampleTest.java https://github.com/muellerc/camel-in-transact

Re: Custom Idempotent Jdbc repository + Using lastmodified time

2012-09-17 Thread webber78
Thanks for your reply. Is there anyway I can get the header you described in a subclass of AbstractJdbcMessageIdRepository. I saw a few examples of getting headers using the Exchange object, but not sure how to get access to these from an idempotent repository. Thanks, Kiran -- View this messa

Re: Distributed transaction in camel route

2012-09-17 Thread James Carman
Done. On Mon, Sep 17, 2012 at 1:49 PM, Christian Müller wrote: > Add an additional test where the SQLExceptions happens after the second > update. > > Best, > Christian > > On Mon, Sep 17, 2012 at 4:29 AM, James Carman > wrote: > >> Something like this: >> >> >> https://github.com/jwcarman/camel

Re: Distributed transaction in camel route

2012-09-17 Thread Christian Müller
Add an additional test where the SQLExceptions happens after the second update. Best, Christian On Mon, Sep 17, 2012 at 4:29 AM, James Carman wrote: > Something like this: > > > https://github.com/jwcarman/camel-in-transaction/blob/master/src/test/java/org/apache/cmueller/camel/samples/camelone/

Re: Custom Idempotent Jdbc repository + Using lastmodified time

2012-09-17 Thread Christian Müller
The FTP consumer (which extends the file consumer) should set the header "CamelFileLastModified". Isn't it? You can read more about it at [1] and [2]. [1] http://camel.apache.org/file2.html [2] http://camel.apache.org/ftp2.html Best, Christian On Mon, Sep 17, 2012 at 5:28 PM, webber78 wrote: >

Re: ApacheCon EU 2012 - Sinnsheim

2012-09-17 Thread Christian Müller
Ok, only a few. I don't think I have to plan a get together for 4 or 5 people. We will do this short term at the evening. @Christian S.: I also have a conflict with my planed presentation at JAX. I'm working with both planners to resolve it... Best, Christian On Thu, Sep 13, 2012 at 12:32 AM, Ch

Re: File renaming problems under Windows

2012-09-17 Thread Christian Müller
failed due cannot delete from file: C:\in\00800530.txt after copy succeeded This happens when the InputStream was not properly closed. This could be a Camel issue or an issue on your side, if you use a custom bean/processor/... and didn't close the InputStream (in this case). I think you have to s

File renaming problems under Windows

2012-09-17 Thread OrackBahama
Hi, I'm getting exceptions when polling and processing files (in the same filesystem). The last camel step is moving the file into a backup or into an error directory using the parameters 'move' and 'moveFailed' of the file component. I'm aware of renaming problems if there's a different filesyst

Custom Idempotent Jdbc repository + Using lastmodified time

2012-09-17 Thread webber78
Hi, I have implemented a custom jdbc idempotent repository(extanding AbstractJdbcMessageIdRepository) to track sftp file downloads. Based on the example from documenation, the only file properties I am able to store in the new table are the messageId (which is the filename). I would like the updat

Re: Protecting route against crashes

2012-09-17 Thread Claus Ibsen
Hi There has been some talks recently about transaction and Camel. See for example http://camel.465427.n5.nabble.com/Distributed-transaction-in-camel-route-td5719279.html On Sun, Sep 16, 2012 at 7:34 PM, ben1729 wrote: > Hi all, > > I have a route that looks something like this, running in Ser

Re: Tutorial 1 fails running with exception

2012-09-17 Thread Babak Vahdat
Just couple of questions: Did you make any modifications of your own inside the example before launching it with "mvn jetty:run"? Did you really make use of the 2.9.3 distribution? And which Maven, JDK and OS did you try it with? Babak domenico wrote > > Hi Babak > > Many thanks for the hint.

Re: Tutorial 1 fails running with exception

2012-09-17 Thread Babak Vahdat
Hi As already said make use of the *latest* release of the 2.9.x branch which's 2.9.3: http://camel.apache.org/camel-293-release.html Then the example should work out of the box. The problem was only on the 2.10.x branch as well as trunk which is already resolved now. And about the "classpath:M

Re: using spring security in java DSL

2012-09-17 Thread Claus Ibsen
On Mon, Sep 17, 2012 at 4:04 PM, Alexander Kaiser wrote: > Hi, > > does anyone know whether it is possible to use a setup with spring-security > as explained at http://camel.apache.org/spring-security.html from a route > defined in java DSL? > Yes it doesnt matter if the route is in XML or Java D

Re: Dynamically variable in Camel

2012-09-17 Thread Claus Ibsen
Hi The RouteBuilder configure method is only invoked once, to setup the Camel routes. So if you want in the 2nd route to refer to a file name from a header, you can use the file/simple language for that. from("seda:myfile").pollEnrich("file:d:/a/?fileName=" + file).unmarshal(bindy).to("bean:va

Re: Processing large files in Camel

2012-09-17 Thread gramanero
Hi Claus, Thank you for the response. After someone hijacked my thread I deleted my postings as I figured no one would respond. Plus, I figured out the problem. You actually touched on the issue I discovered. When I send the message to AMQ you are correct in that the entire file content was being

Re: Tutorial 1 fails running with exception

2012-09-17 Thread domenico
Hi Babak Many thanks for the hint. But again, no success. I still get the same exception on mvn jetty:run java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.apache.cxf.transport.servlet.CXFServlet javax.servlet.Unavailable

Re: To many opened files

2012-09-17 Thread Aki Yoshida
Hi Willem, considering that part to go async, that makes more sense :-) thanks. regards, aki 2012/9/17 Willem jiang : > Hi Aki, > > It makes sense. The httpExchange has bunch of on method to take care of > it. > We should try to close the input stream when the exception is thrown. > > I just

Re: To many opened files

2012-09-17 Thread Willem jiang
Hi Aki, It makes sense. The httpExchange has bunch of on method to take care of it. We should try to close the input stream when the exception is thrown. I just filled a JIRA[1] for it. [1]https://issues.apache.org/jira/browse/CAMEL-5621 -- Willem Jiang Red Hat, Inc. FuseSource is now pa

Dynamically variable in Camel

2012-09-17 Thread Elezabeth
Hi , I am new to Camel. My requirement is something like this . I have to read a csv file in a folder when an HTTP url is invoked. This is fine. But I will get a url with a requestparameter called "fileName" and now this is the name of that csv file which i have to read. Eg; if my url is*/

Re: To many opened files

2012-09-17 Thread Aki Yoshida
I think there is an issue in JettyHttpProducer. public boolean process(Exchange exchange, final AsyncCallback callback) { JettyContentExchange httpExchange = null; try { httpExchange = createHttpExchange(exchange, callback); doSendExchange(client, httpEx

Re: Camel vs BPEL

2012-09-17 Thread Raul Kripalani
To be honest, I see companies paying extraordinary sums to get hold of TIBCO, Oracle, WebMethods, etc. consultants. So they end up paying license + knowledge. With Camel, they only invest in knowledge. Sorry, but I can't say I share your views in this sense ;) -- View this message in context: h

Re: Camel vs BPEL

2012-09-17 Thread Raul Kripalani
For persistence and transactionality, you can use cascading JMS queues to link your process steps in a sequence, such that messages will only be ACK'ed or transactions will commit if that step of the process succeeded. And for human task processing, BPEL doesn't provide a solution anyway. Some ext