On Sun, Dec 20, 2009 at 2:29 PM, sjmcduf <[email protected]> wrote:
>
> Ok I will not create a JIRA task!
>
> We should also check the following:
>
> �...@converter
>  public static String toString(URL url, Exchange exchange) throws
> IOException
>  {
>    return toString(toInputStream(url), exchange);
>  }
>
> Maybe to do the same fix!
>

Well spotted again. I have just commtited a fix for that one as well.

>
> Simon
>
>
>
> Claus Ibsen-2 wrote:
>>
>> Created ticket
>> https://issues.apache.org/activemq/browse/CAMEL-2306
>>
>> And committing a fix in due time when unit tests passed and completes.
>>
>>
>> On Sun, Dec 20, 2009 at 9:16 AM, Claus Ibsen <[email protected]>
>> 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
>>>
>>
>>
>>
>> --
>> 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-tp26857645p26863529.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

Reply via email to