Re: splitter, enricher, aggregator

2013-05-05 Thread Claus Ibsen
Hi You can write a java bean with a method that enrichs with data from the file. public String enrichMe(@Header(id) String id) { And then use some stax / xml / xpath api to find the selection to enrich. Mind that the xpath from the JDK works only in-memory so if you want to use that, then

Invoking Camel routes using XML fields and using database values

2013-05-05 Thread pbs
My use case is as follows: Step1: As soon as a xml file arrives in one hot folder(Say directory A), I need to read some fields in that XML file. Structure of XML file is provided below. After reading the jobId field from XML file, I need to get the corresponding ''jobname'' from a database

Invoking camel route using values in database table.

2013-05-05 Thread pbs
Please help in implementing following use case. Step1: I receive one XML file. I use some ETL tool to parse the XML file and store the data of XML in database table as it is. My question is how to trigger a camel route using values from database table populated in step1. Any directions/approach

Re: Will camel-websocket work in producer mode from a web app?

2013-05-05 Thread Romain Manni-Bucau
Typhus is the ri bus integrating with tomcat/jetty when deployed in them is better too Le 5 mai 2013 07:48, Claus Ibsen claus.ib...@gmail.com a écrit : Hi Yeah using the websocket jsr would be a good idea. I would assume Atmosphere implements the JSR or will do. Though if there is another

Re: IS the File polling possible in CAMEL.

2013-05-05 Thread umashankar29
Thanks Clause, My next query is can we be able to restrict the incoming file by polling the files to say ~200 Files for every 2 mins . Thanks Shan -- View this message in context: http://camel.465427.n5.nabble.com/IS-the-File-polling-possible-in-CAMEL-tp5732019p5732030.html Sent from the

Re: IS the File polling possible in CAMEL.

2013-05-05 Thread Claus Ibsen
Hi Yeah you can configure the file endpoint with poll every X time, and limit the poll to Y files. eg you can set these options delay=2m maxMessagesPerPoll=200 notice 2m is shorthand for 2 minutes. The file component is documented here http://camel.apache.org/file2 On Sun, May 5, 2013 at

Re: Skip multiple leading lines in CSV file

2013-05-05 Thread Claus Ibsen
Hi You can use a java bean in the camel route, and then maybe use java.util.Scanner or InputStream, to position the stream where you want to start. If its a common use-case we can consider some Camel expression / function to a language / etc. so it configurable even easier. For example some

Re: Camel LDAP How to add , remove , modify from LDAP Server?

2013-05-05 Thread Claus Ibsen
camel-ldap can only do searches. There is a camel-spring-ldap that can do more. http://camel.apache.org/spring-ldap You can check out its unit tests to see some examples https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring-ldap/src/test/ The spring-ldap component uses the Spring

Re: splitter, enricher, aggregator

2013-05-05 Thread ihullu
Hi Claus, Thank you for the quick response. You basically advice to use a bean to do the enriching. Is it not possible to use more of the build in functionality of Camel to do the job. Inside the bean I need to write a lot of code to lookup the correct element based on the id and add the

Problem debugging Exception

2013-05-05 Thread ihullu
Hello, I have the attached project. The problem is I get an exception. I cannot catch this exception in the Eclipse debugger to see what is wrong. When I comment out the line: .setHeader(id, xpath(/Product/id/text())).log(id = ${in.header.id}) it works. When I leave it in it does not work

Re: Skip multiple leading lines in CSV file

2013-05-05 Thread helander
Hi Claus and thanks for the info. I will probably do as you suggest, I just wanted to make sure that there was no out-of-the-box way provided by Camel before I went ahead :). Thanks Lasse -- View this message in context:

Re: Camel retries a message after the message has been completed successfully

2013-05-05 Thread bocamel
I can avoid this issue by throttling the file polling by adding the following options to the file uri: initialDelay=3000delay=1000maxMessagesPerPoll=20. It seems that the exception occurs in one of the following two situations: 1. When Camel polls the folder immediately after being started

Exception running a simple websocket with Camel component on Jetty

2013-05-05 Thread soumya_sd
We have been struggling with this issue for a while. I don't want to replicate the post that I've already put on Stackoverflow. If someone can give pointers about what's missing here I would really appreciate that. .

camel shiro security policy with alwaysReauthenticate set to false doesn't detect seperate user logging-in

2013-05-05 Thread jethwani.bi...@gmail.com
Here's the code which I had to re-work to make it work for me.apache-camel-2.10.4ShiroSecurityPolicy.authenticateUser *It was:* private void authenticateUser(Subject currentUser, ShiroSecurityToken securityToken) { if (!currentUser.isAuthenticated()) { ...

Re: Upgrade from 2.10 - 2.11.0

2013-05-05 Thread kalber
Thanks, it works. -- View this message in context: http://camel.465427.n5.nabble.com/Upgrade-from-2-10-2-11-0-tp5732017p5732045.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How can Shiro be used with camel to limit access to a route?

2013-05-05 Thread jethwani.bi...@gmail.com
I doubt if type converter works for camel header. Has this camel shiro issue been resolved? It shouldn't actually be ByteSource object?? Let me know I am kind of struck with this. -- View this message in context:

Re: Problem debugging Exception

2013-05-05 Thread Claus Ibsen
Hi Here is some pointers how to debug Camel routes http://camel.apache.org/debugger.html But in your case there must be more information in that stacktrace that can tell you what the problem is. As you use XML and XPath its 99% a problem with your xpath expression not working. There is XML /

Re: camel shiro security policy with alwaysReauthenticate set to false doesn't detect seperate user logging-in

2013-05-05 Thread Claus Ibsen
Hi Yeah well spotted. Not sure if you need to logout the old users when you detect a new user? Anyway fell free to log a JIRA ticket and attach a patch with the fix. http://camel.apache.org/support On Sun, May 5, 2013 at 3:40 PM, jethwani.bi...@gmail.com jethwani.bi...@gmail.com wrote:

Re: How can Shiro be used with camel to limit access to a route?

2013-05-05 Thread Claus Ibsen
Hi Yeah we could add a new option to camel-shiro to use base64 as a String type for the token. Then that header is safely transferable over JMS. BytesSource has a toBase64 method, and as well a method to create a BytesSource from a String. So that should be fairly easy to do.

Exception handling for camel-ftp

2013-05-05 Thread sarfaraj
Hi, I am using camel-ftp (2.10.4) in my camel application(camel-route). If the ftp related error occured like wrong credential or incorrect IP then it throws org.apache.camel.component.file.GenericFileOperationFailedException exception. I want to retry 3 times if FTP error occured, for that i

Re: Exception handling for camel-ftp

2013-05-05 Thread Claus Ibsen
You can use onWhen in the onException and use a predicate to check if you want to react or not. The GenericFileOperationFailedException ought to have a getCode / getReason() or something that returns the FTP error code. On Mon, May 6, 2013 at 7:30 AM, sarfaraj sarfarajsay...@gmail.com wrote: