And, yes, can you give us a full trace of the exception? Thanks
Oliver 2005/11/22, Oliver Zeigermann <[EMAIL PROTECTED]>: > Hi, > > I looked at the code of commit and it really looks ok. Is it always > the same file (or same category of file) that is not found? > > FileHelper.moveRec is only called from inside of > TransactionContext.commit which is synchronized on the context. This > means if a file that should be there no longer exists has probably > been deleted in between finding the children of a folder and iterating > through it. This can only be done by a second thread which should not > have any access to the directory of this transaction. > > Note #1: That two transactions running on the same store dir can not > interfere while committing as this is prevented by locks. > > Note #2: No other process/thread/whatever may access the store > directory that FRM is working on. > > Are you sure that #2 is guaranteed in your application? > > Oliver > > 2005/11/22, Cservenak Tamas <[EMAIL PROTECTED]>: > > Hi! > > > > Another issue i've got is that FileResourceManager (actually > > FileHelper's moveRec) during commitTransaction() throws > > FileNotFoundException on [new FileOutputStream(File)]. This error > > appears stochastic, sometime after 5 min of run, sometime after 20min of > > run, and i dont know where to issue it. > > > > Note: my app runs on 4 threads, consequent stages running each in it's > > own thread passing input (previous stage) [file] to the output [file] > > (next stage) using Tx. > > > > Is it ok, to call frm.commitTransaction() simultaneosly from 4 different > > threads (each thread starts and commits it's own tx)? Each thread works > > like doBeforeTx() - doInTx() - doAfterTx(), there are no tx sharing > > among threads (each thread works in and knows just about it's own tx). > > > > This should be OK, as stated in Javadoc of FRM.... > > > > I have some thin abstraction layer above Commons Transaction, so > > currently i have TxFS (using Commons Transaction), TxOracle (using > > Oracle) and TxEmbeddedDerby (on Derby 10.1) as pluggable Storage > > back-ends to this pipeline, but this layer just brings tthese back-ends > > to a common "resource manager" API, nothing else (all three are trivial > > code actually). > > > > The strange is that when i synchronize commit() on my Tx wrapper level > > (thus blocking simultaneous commit or rollback on app level) Commons > > Transaction is working fine, no FileNotFoundException is thrown. Am i > > missing something? Reading Javadoc convinced me that commiting and > > rollbacking is OK to do from multiple threads.... > > > > There are only one instance of FRM in my app. > > > > HW: P4, Linux 2.6, ReiserFS local disk, Java 1.5 > > > > Thanx in advance, > > Tamas > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
