Atomikos Forum |
|
In file UserTransactionServiceImp.java in Atomikos 3.3.3
this code is wrong try { lockfilestream_ = new FileOutputStream ( lockfile_ ); lock_ = lockfilestream_.getChannel().tryLock(); lockfile_.deleteOnExit(); } catch ( IOException failedToGetLock ) { //happens on windows lock_ = null; } method tryLock() throws OverlappingFileLockException not IOException. Good code : try { lockfilestream_ = new FileOutputStream ( lockfile_ ); lock_ = lockfilestream_.getChannel().tryLock(); lockfile_.deleteOnExit(); } catch ( OverlappingFileLockException failedToGetLock ) { //happens on windows lock_ = null; } catch ( IOException failedToGetLock ) { //happens on windows lock_ = null; } Maybe this piece of code shouldnt never run when enableRecovery is false ? Not sure. |