camel-ftp problem:fatch files from remote folder

2010-04-13 Thread Worthy
Hi I get a problem while getting files from remote ftp folder and save it to my a local folder. here are my codes: from(ftp://u...@192.168.0.2/test/send?password=passbinary=true;) .to(file://C:/test/ftp/receive); It does't work after I put files to the target folder. meanwhile, I have

Re: Injecting ProducerTemplates, scoping, and JMX memleak

2010-04-13 Thread Claus Ibsen
On Tue, Apr 13, 2010 at 1:22 AM, matthewm mmo...@gmail.com wrote: Hello, We are using Camel 2.2.0 with Spring 3.0.1.RELEASE in the context of a web service. We've been using @EndpointInject to inject ProducerTemplates into our beans. Some of our beans are request scoped, and so a new

Re: POJO Example with https transport

2010-04-13 Thread Claus Ibsen
On Mon, Apr 12, 2010 at 5:06 PM, Mike Rawlins m...@mcrawlins.net wrote: No, I generally abhor cross-posting and since this and the previous note seemed more related to Camel than AMQ, I elected to post here. Well I actually think its the reverse. You post about how to use HTTPS transport with

Retry Processing

2010-04-13 Thread PatrickVB
Hi all, I want to implement the following functionality The system received an xml message on a queue. The message contains references to files for your information. This message is then forwarded to a processor which is responsible for performing extraction (unzipping, unrarring,...) of

Testing and dynamic filenames.

2010-04-13 Thread ankelee
Hello Using Camel 2.3.0 SNAPSHOT I've made a route where I use a wireTap to back up any incoming files and timestamp the filename like so: from(file:// + props.getProperty(directory.incoming)) .routeId(processing)

Re: Testing and dynamic filenames.

2010-04-13 Thread Claus Ibsen
Hi Just check that there is a new file in the backup folder. And its file content is as expected. On Tue, Apr 13, 2010 at 11:06 AM, ankelee andreasasm...@gmail.com wrote: Hello Using Camel 2.3.0 SNAPSHOT I've made a route where I use a wireTap to back up any incoming files and timestamp

Re: extended Camel Mail Component not working

2010-04-13 Thread Srini97
Hi, I Identified the problem. the culprit is mock-javamail which I am using it for testing purpose. so I have removed it and it works fine. Thanks Sri Srini97 wrote: no luck :( , I went and saw the sender code on the producer sender.send(new MimeMessagePreparator() {

Re: need help with interceptor in camel 1.6.2 using custom predicate

2010-04-13 Thread Claus Ibsen
Hi I have created an example in 1.x as unit test, which is invoked 3 times. Apache SVN have issue currently with committing so I paste the test here davsclaus:(svn)camel-1x[camel-1.x:925986]/$ svn diff Index: camel-core/src/test/java/org/apache/camel/issues/CBRCustomPredicateAsFilterTest.java

Re: bridging binary files over http

2010-04-13 Thread rdomingo
Hello Willem, Creating a patch shouldn't be a problem, BUT the reason I didn't create a patch is because I'm not 100% Sure my solution doesn't break any existing stuff. Can you review my proposed temp file deletion change, is it likely it won't break any existing stuff ? willem.jiang wrote:

Re: Camel-ftp component problem

2010-04-13 Thread olamalam
Hi Willem, I've downloaded Felix Karaf 1.4.0 and will try to solve the same problem with it but even if it works on Felix Karaf 1.4.0 we may not migrate from serviceMix Kernel 1.1 to Felix Karaf 1.4.0. right now. So I'm still trying to find a workaround for serviceMix Kernel. willem.jiang

File consumer with noop=truerecursive=true

2010-04-13 Thread sagy
Hi, I'm using Camel 2.2 and have the following route: from(file://test?recursive=truenoop=true).process(... When I drop a file f1.txt into the test folder the processor gets called. When I drop the file f2.txt into a sub folder of test folder for example test/sub/f2.txt ,again the processor

Re: Camel-ftp component problem

2010-04-13 Thread olamalam
Hi Christian, Previously I run these commands to install camel-ftp: osgi:install -s mvn:org.apache.camel/camel-core/2.2.0 osgi:install -s mvn:org.fusesource.commonman/commons-management/1.0 osgi:install -s mvn:org.apache.camel/camel-spring-osgi/2.2.0 osgi:install -s

Re: File consumer with noop=truerecursive=true

2010-04-13 Thread Claus Ibsen
Hi Yeah its on purpose for some reason, which as I can't really recall right now. On Tue, Apr 13, 2010 at 2:33 PM, sagy sagyroz...@gmail.com wrote: Hi, I'm using Camel 2.2 and have the following route: from(file://test?recursive=truenoop=true).process(... When I drop a file f1.txt into

Re: File consumer with noop=truerecursive=true

2010-04-13 Thread sagy
I'm actually trying to consume files from a directory recursively and the directory has read-only permissions. Is there another way to do it without using noop=truerecursive=true ? Thanks, Sagy Claus Ibsen-2 wrote: Hi Yeah its on purpose for some reason, which as I can't really recall

Re: Deploying as web app with jetty endpoint

2010-04-13 Thread jfaath
I played around with this by removing everything below the ContextLoaderListener listener. I still get the same error. As a rule, it seems that Tomcat always loads listeners before servlets. What exactly is the expected behavior of the bootstrap process in the servlet container? What is the

Re: File consumer with noop=truerecursive=true

2010-04-13 Thread Claus Ibsen
On Tue, Apr 13, 2010 at 3:33 PM, sagy sagyroz...@gmail.com wrote: I'm actually trying to consume files from a directory recursively and the directory has read-only permissions. Is there another way to do it without using noop=truerecursive=true ? You can filter out the read-only directory if

Re: File consumer with noop=truerecursive=true

2010-04-13 Thread sagy
I'm trying to consume files from it not skip it. This is a general description of the situation: There is another application with write permissions which create files in that directory and sub directories. My application only has read permissions but I still need to consume the files from that

Re: File consumer with noop=truerecursive=true

2010-04-13 Thread Claus Ibsen
On Tue, Apr 13, 2010 at 5:10 PM, sagy sagyroz...@gmail.com wrote: I'm trying to consume files from it not skip it. This is a general description of the situation: There is another application with write permissions which create files in that directory and sub directories. My application

Re: Camel-ftp component problem

2010-04-13 Thread olamalam
Hello again Willem, I tried to install camel-ftp in Felix Karaf 1.4.0 too but it is requesting some libraries (for ex: javax.xml.bind) included in Java sdk. Should I also install those bundles too? Please note that I run this command: osgi:install -s mvn:org.apache.camel/camel-ftp/2.2.0 Thanks

Re: Camel-ftp component problem

2010-04-13 Thread Charles Moulliard
Which version of Java are you using (5 or 6) ? If you use JDK 6, those classes are provided by the jdk To allow the osgi server (felix) to load at the startup the javax.xml.bind classes, you must uncomment the following line under the file etc/config.properties # javax.xml.bind, \ #

Re: File consumer with noop=truerecursive=true

2010-04-13 Thread sagy
exactly. Lets assume a directory root called /test the writing application will write the following files: /test/file1.txt /test/file2.txt /test/sub-folder/file1.txt etc.. My application will get an event for /test/file1.txt /test/file2.txt but not for /test/sub-folder/file1.txt since

Re: File consumer with noop=truerecursive=true

2010-04-13 Thread sagy
Here is a small junit test which explains the problem: public void testIdempotentConsumerDoesntIgnoreRecursiveDuplicates() throws Exception { String newFile1 = some_dir/some_file3; String newFile2 = some_file3;

Re: File consumer with noop=truerecursive=true

2010-04-13 Thread Claus Ibsen
On Tue, Apr 13, 2010 at 5:49 PM, sagy sagyroz...@gmail.com wrote: exactly. Lets assume a directory root called /test the writing application will write the following files: /test/file1.txt /test/file2.txt /test/sub-folder/file1.txt etc.. My application will get an event for

File consumer with recursive=true. Delete subfolder

2010-04-13 Thread lefdev
Hi, I am using camel 2.2 Is there a way to delete subfolders using the file component and recursive option? The following route only deals with files placed in /data/inbox and all it's subfolders. from(file:data/inbox?delete=truerecursive=true) -- View this message in context:

Re: File consumer with recursive=true. Delete subfolder

2010-04-13 Thread Claus Ibsen
On Tue, Apr 13, 2010 at 5:55 PM, lefdev lef...@yahoo.com wrote: Hi, I am using camel 2.2 Is there a way to delete  subfolders using the file component and recursive option? No it only delete files. The following route only deals with files  placed in /data/inbox and all it's subfolders.

Re: File consumer with noop=truerecursive=true

2010-04-13 Thread sagy
Thanks Claus! Claus Ibsen-2 wrote: On Tue, Apr 13, 2010 at 5:49 PM, sagy sagyroz...@gmail.com wrote: exactly. Lets assume a directory root called /test the writing application will write the following files: /test/file1.txt /test/file2.txt /test/sub-folder/file1.txt etc.. My

Re: Retry Processing

2010-04-13 Thread Claus Ibsen
Hi A JMS Broker often also have a redelivery mechanism which you can leverage. For example Apache ActiveMQ have a dead letter queue etc. Camel error handler is also capable of redelivery and dead letter channel and whatnot. You can use it to detect that the redelivery have exhausted and then

Re: Retry Processing

2010-04-13 Thread PatrickVB
Hi Claus, Thanks a lot for the hints. I bought Camel in action and it looks very promissing. I will give it a try. When encountering problems, I will probably have to come back to the forum with more detailed questions. Thanks again Patrick Claus Ibsen-2 wrote: Hi A JMS Broker often

Re: Injecting ProducerTemplates, scoping, and JMX memleak

2010-04-13 Thread matthewm
Thank you Claus and Willem. The plot thickened a bit this morning. Hoping that disabling JMX would disable the leak, I turned it off (by adding an agent definition to my application context). This slowed but did not eliminate the leak. Further digging showed that, even with management

File consumer + POJO splitter

2010-04-13 Thread John Landahl
I've discovered strange behavior (at least to me) when using a file consumer connected to a POJO splitter. Here's my route: from(file:input). split().method(fileSplitter, split). to(mock:out) If my POJO returns a list of newly created messages (via new DefaultMessage() as

Re: Injecting ProducerTemplates, scoping, and JMX memleak

2010-04-13 Thread Willem Jiang
Hi Matt, Please see my comment in the mail. matthewm wrote: Thank you Claus and Willem. The plot thickened a bit this morning. Hoping that disabling JMX would disable the leak, I turned it off (by adding an agent definition to my application context). This slowed but did not eliminate the

Re: Deploying as web app with jetty endpoint

2010-04-13 Thread Willem Jiang
Oh, you should not use the ContextLoaderLister to load the camel route. There is a contextConfigLocation parameter that you can pass to the CamelHttpTransportServlet to load the camel route. You can find the example here

JPA component - EntityManagerFactory issue

2010-04-13 Thread vcheruvu
Hi, In my project, I am using JPA and using Hibernate vendor to poll tables. Please see my config below. I am trying to setup multiple persiste http://old.nabble.com/file/p28237771/trace-jpa.txt trace-jpa.txt nce.xml file in my project. bean camel-context ... route

Re: JPA component - EntityManagerFactory issue

2010-04-13 Thread Claus Ibsen
Hi You can set the EntityManagerFactory on the JpaComponent, and Camel will reuse this one. bean id=jap class=org...JpaComponent property name=entityManagerFactory ref=myEntityFac/ /bean On Wed, Apr 14, 2010 at 4:34 AM, vcheruvu vid.cher...@macquarie.com wrote: Hi, In my project, I am

Re: JPA component - EntityManagerFactory issue

2010-04-13 Thread vcheruvu
Thanks that worked nicely. So if i didn't have this bean definition, Spring and Camel would have instantiated the entityManagerFactory twice. As per the jpa example in the Camel src, perhaps it would be good idea to add this bean as part of the spring based camel config example and avoid