commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Gustavsson <>
Subject Re: [transactions] No detection of failed deletion of file
Date Wed, 16 Nov 2005 17:32:20 GMT

actually it would help with our original case (that was caused by 
incorrect file rights on a Unix box). However, the test case I wrote do 
not use access rights but instead just keeps the open for writes as I 
didn't want to fiddle with the access rights from the unit test :-)


Oliver Zeigermann wrote:
> Might actually work for this special case, but I would not want to
> make the code more complicated unless really needed. As you say that
> it does not really help with your problem I would rather vote against
> introducing it.
> Thoughs?
> Oliver
> 2005/11/15, Niklas Gustavsson <>:
>>If that test (File.canWrite()) was executed during deleteResource() and
>>if failing it would directly throw an Exception. That would mean that we
>>get the exception before the commit. Now, this won't fix my test case as
>>canWrite() doesn't detect write-locked files but I guess it could work
>>for cases where you do not have the necessary file access. What do you
>>Oliver Zeigermann wrote:
>>>Yes, I think so. But if you tried it would not fail before commit.
>>>2005/11/13, Niklas Gustavsson <>:
>>>>well, I'm not sure how to do this either. Could File.canWrite() be an
>>>>Oliver Zeigermann wrote:
>>>>>You are right. It would be desirable to make it fail as soon as
>>>>>possible. This would mean, however, that you touch the original file
>>>>>as soon as you try to delete it and not only when you commit the
>>>>>transaction. But the philosophy if this transactional implementation
>>>>>is not to touch the original file before commit. There are other
>>>>>implementations imaginable that make all the modifications on the
>>>>>original file but keep a backup for rollback, though.
>>>>>Thus, in short, the answer is that I do not know how to check this
>>>>>earlier given this implementation, but with others it would be
>>>>>But, maybe, I am just not smart enough to find a solution ;)
>>To unsubscribe, e-mail:
>>For additional commands, e-mail:

Niklas Gustavsson

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message