consumerTemplate.receive function on same file hanging.

2012-10-31 Thread demetrios
Hi All
I am new to camel and currently have an issue with a fileConsumer I have
built.

I am using camel to read in a message file via a route.  As part of this I
am using the body received in this file to read to acquire a file location
defined in the body.I then want camel to take this value and read in a
new body from another file.

Here is what my consumer routine looks like:

public void hello(@Header("Camel.File") String filePath, @Body String
body, Exchange exchange){
int lastSlash =
filePath.lastIndexOf(System.getProperty("file.separator"));
String path = filePath.substring(0, lastSlash);
String fileName = filePath.substring(1+lastSlash);
Exchange newExchange =
consumerTemplate.receive("file:"+path+"?fileName="+fileName)
exchange.getIn().setBody(newExchange.getIn().getBody());

}

This works fine one the first run for a particular file however if I want to
reprocess that message in the same instance to the same file, the call :
consumerTemplate.receive("file:"+path+"?fileName="+fileName)
hangs.

I have debugged into the receive call and it seems that the file read in
earlier is still locked by the previous run.

Does anyone have any ideas on what I am missing here?



--
View this message in context: 
http://camel.465427.n5.nabble.com/consumerTemplate-receive-function-on-same-file-hanging-tp5721925.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Issue with property values from files post 2.9.1 2.10.3 update

2013-01-01 Thread demetrios
Hi
I needed to update the version of camel I use from 2.9.1 to 2.10.3 to
address the issue found here
https://issues.apache.org/jira/browse/CAMEL-5608

As a result of this I am having problems with property values sourced from
my properties files in the camel context.

I have a property in a file which is loaded which contains a path locations
eg.   C:\Users\Temp
The value is defined in the file as 
temp.dir.local=C:\\Users\\Temp.
Previous to my update to 2.10.3 this worked fine.  I was able to log ooutput
from the camel context and the output would be C:\Users\Temp.

After the upgrade the output now returns as C:UsersTemp omitting backslash
characters.
After some trial an error I discovered that if I defined the value in the
file as C:UsersTemp this would output as C:\Users\Temp. 
So it looks like for some reason camel has double parsed the value?
I am using camel through spring.
Does anyone have any thoughts on why this is now occurring for me?




--
View this message in context: 
http://camel.465427.n5.nabble.com/Issue-with-property-values-from-files-post-2-9-1-2-10-3-update-tp5724758.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Issue with property values from files post 2.9.1 2.10.3 update

2013-01-02 Thread demetrios
Has anyone got a response to this.
I know this functionality has changed from version 2.9.3.  
In the spring context everything works as expected but once you go into the
camel context it will for some reason re parse the expected single backslash
as an escape character.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Issue-with-property-values-from-files-post-2-9-1-2-10-3-update-tp5724758p5724806.html
Sent from the Camel - Users mailing list archive at Nabble.com.