On Sun, Dec 20, 2009 at 2:25 PM, sjmcduf <[email protected]> wrote: > > Yes I'm using windows!
Great as this is the platform we have seen this issue before. > Do you still want me create a JIRA task ? No I took the liberty and created the ticket. The bug is fixed and will be in the next 2.2 release. Thanks for reporting. > Simon > > > Claus Ibsen-2 wrote: >> >> On Sat, Dec 19, 2009 at 7:59 PM, sjmcduf <[email protected]> wrote: >>> >>> I tried to do something very simple: >>> from("file://" + inputDirectory + >>> "?recursive=true&readLock=none&delete=true").to("activemq:queue:QUEUE); >>> >>> I received many error message saying that the file cannot be deleted. >>> >>> After some investigation, it seems the file is still open... >>> >>> I found out the following in IOConverter:(used by the JMS when sending to >>> the queue) >>> >>> @Converter >>> 175 public static byte[] toByteArray(File file) throws IOException { >>> >>> 176 return toBytes(toInputStream(file)); >>> >>> 177 } >>> >>> >>> If I do the following, it works as expected: >>> @Converter >>> public static byte[] toByteArray(File file) throws IOException >>> { >>> InputStream inputStream = toInputStream(file); >>> try >>> { >>> return toBytes(inputStream); >>> } >>> finally >>> { >>> inputStream.close(); >>> } >>> } >>> >>> >>> Is this a bug ? >>> >> >> Thanks for spotting. Yeah its a bug. Will get that fixed. >> >> Do you use Windows by any chance? >> >> >> >>> Thank you >>> (CAMEL 2.1.0) >>> -- >>> View this message in context: >>> http://old.nabble.com/Problem-with-JMS-and-file-tp26857645p26857645.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >>> >>> >> >> >> >> -- >> Claus Ibsen >> Apache Camel Committer >> >> Author of Camel in Action: http://www.manning.com/ibsen/ >> Open Source Integration: http://fusesource.com >> Blog: http://davsclaus.blogspot.com/ >> Twitter: http://twitter.com/davsclaus >> >> > > -- > View this message in context: > http://old.nabble.com/Problem-with-JMS-and-file-tp26857645p26863492.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
