commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cservenak Tamas <cserve...@is-micro.hu>
Subject [transaction] FileNotFoundException during commitTransaction()
Date Tue, 22 Nov 2005 17:30:19 GMT
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


Mime
View raw message