You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by harryw <ha...@gmail.com> on 2011/04/15 16:33:39 UTC

Using File Component on Readonly Directory

Greetings everyone. I am new to Camel so bear with me...

Is there a proper way to configure a file component on a read-only
directory? I have a unit test using the CamelTestSupport class (Camel 2.7)
which uses the createRouteBuilder method to create an instance of a simple
File-Processor-File route. I copy a few files into the inbox folder then
make it read-only using File.setWritable(false, false).

Camel will not pick up any of the files. My tests waits a few seconds and
quickly fails because there are no copies in outbox. When I comment out
setWritabe(), the test succeeds. 

Does my test make sense? What parameters do I need to send to the file
component for this to work?

Thank you for any attention in advance.


--
View this message in context: http://camel.465427.n5.nabble.com/Using-File-Component-on-Readonly-Directory-tp4305703p4305703.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Using File Component on Readonly Directory

Posted by harryw <ha...@gmail.com>.
Worked great. Thank you Claus!

--
View this message in context: http://camel.465427.n5.nabble.com/Using-File-Component-on-Readonly-Directory-tp4305703p4306029.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Using File Component on Readonly Directory

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Apr 15, 2011 at 4:33 PM, harryw <ha...@gmail.com> wrote:
> Greetings everyone. I am new to Camel so bear with me...
>
> Is there a proper way to configure a file component on a read-only
> directory? I have a unit test using the CamelTestSupport class (Camel 2.7)
> which uses the createRouteBuilder method to create an instance of a simple
> File-Processor-File route. I copy a few files into the inbox folder then
> make it read-only using File.setWritable(false, false).
>
> Camel will not pick up any of the files. My tests waits a few seconds and
> quickly fails because there are no copies in outbox. When I comment out
> setWritabe(), the test succeeds.
>
> Does my test make sense? What parameters do I need to send to the file
> component for this to work?

http://camel.apache.org/file2
Set the noop=true option. And readLock=none

>
> Thank you for any attention in advance.
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Using-File-Component-on-Readonly-Directory-tp4305703p4305703.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/