Hi See the documentation in the javadoc here http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/CamelContext.html
And this FAQ http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html On Mon, Sep 29, 2014 at 8:39 PM, condreynl <condre...@gmail.com> wrote: > I have a simple route for doing file normalization tasks. I have a working > version that goes something like: > > myRoute extends RouteBuilder(){ > configure(){ > from("direct:normalize").process().to("file:filePath?fileName=theFileName"); > }} > > I have a class that has a CamelContext variable. The implementation looks > just like what I found in the documentation: > > CamelContext context = new DefaultCamelContext(); > context.addRoutes(new myRoute()); > File myFile = new File("filepath"); > > context.start(); > context.createProducerTemplate("direct:normalize",myFile) > > Whenever I replace direct:normalize with a file URI, nothing happens. The > console tells me that the route has begun consuming from the file endpoint, > but then immediately disconnects without running the route. For example, my > configure method looks like: > > from(file URI).process().to(file URI) > > and my context class looks like > > //initialize context to default > context.addRoutes(new myRoute); > context.start(); > > Have I used the file URI's correctly? Here is an example of one: > from(file:/home/usrName/Documents?fileName=theFileName.txt&fileExist=Append > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Using-file-URI-s-correctly-tp5757208.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/