You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Niklas Gustavsson <ni...@protocol7.com> on 2005/05/11 22:26:19 UTC

[transactions] Scattered files

Hi all,

when using FileResourceManager, you need to supply a storeDir. Now, if I 
need to write files to different locations within the same transaction. 
For example c:\somedir\somesubdir\file.txt and 
c:\someotherdir\someotherfile.txt, could I specify c:\ as my store dir 
and use the full path (without c:\) as the resource ID? Will this be an 
issue with having multiple FileResourceManagers working on c: (the Java 
docs mentions "Special Caution: Be very careful not to have two 
instances of FileResourceManager working in the same store and/or 
working dir."). What type of issues might this cause? Deadlocks?

Is it at all possible to write file to seperate discs (c:, d:) within 
the same transaction? I know that the docs does not recommend doing this 
because the lack of check for disc space, but anyways?

Thanks!
/niklas


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [transactions] Scattered files

Posted by Oliver Zeigermann <ol...@gmail.com>.
On 5/11/05, Niklas Gustavsson <ni...@protocol7.com> wrote:
> when using FileResourceManager, you need to supply a storeDir. Now, if I
> need to write files to different locations within the same transaction.
> For example c:\somedir\somesubdir\file.txt and
> c:\someotherdir\someotherfile.txt, could I specify c:\ as my store dir
> and use the full path (without c:\) as the resource ID? Will this be an

Yes.

> issue with having multiple FileResourceManagers working on c: (the Java
> docs mentions "Special Caution: Be very careful not to have two
> instances of FileResourceManager working in the same store and/or
> working dir."). What type of issues might this cause? Deadlocks?

No deadlocks, but possibly inconsistent data as locking only takes
effect inside a single resource manager.
 
> Is it at all possible to write file to seperate discs (c:, d:) within
> the same transaction? I know that the docs does not recommend doing this
> because the lack of check for disc space, but anyways?

It is not possible to do so. All files participating in a transaction
must have the same root.

Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org