ozeigermann 2004/12/14 04:31:24
Modified: src/stores/org/apache/slide/store/txfile
AbstractTxFileStoreService.java
. build.xml
Added: lib commons-transaction-1.1-pre-20041214.jar
Log:
Added real deadlock detection for tx file store using pre-version of
Commons transaction 1.1
Revision Changes Path
1.18 +5 -10
jakarta-slide/src/stores/org/apache/slide/store/txfile/AbstractTxFileStoreService.java
Index: AbstractTxFileStoreService.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/stores/org/apache/slide/store/txfile/AbstractTxFileStoreService.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- AbstractTxFileStoreService.java 7 Dec 2004 17:03:02 -0000 1.17
+++ AbstractTxFileStoreService.java 14 Dec 2004 12:31:24 -0000 1.18
@@ -28,7 +28,6 @@
import org.apache.commons.transaction.file.ResourceManagerException;
import org.apache.commons.transaction.util.xa.XidWrapper;
import org.apache.slide.common.*;
-import org.apache.slide.macro.ConflictException;
import java.io.File;
import java.util.Hashtable;
@@ -382,17 +381,13 @@
}
- // TODO if error is caused by lock that could not be acquired
- // we should try deadlock detection instead of simply rolling back
- // if no deadlock is detected, retrying for lock would be preferred
method
public synchronized void throwInternalError(Throwable cause, String uri)
throws ServiceAccessException {
Object txId = getActiveTxId();
if ((cause instanceof ResourceManagerException)
- && ((ResourceManagerException) cause).getStatus() ==
ResourceManagerException.ERR_NO_LOCK) {
+ && (((ResourceManagerException) cause).getStatus() ==
ResourceManagerException.ERR_NO_LOCK || ((ResourceManagerException) cause)
+ .getStatus() ==
ResourceManagerException.ERR_DEAD_LOCK)) {
- // XXX strictly speaking, this is incorrect, as we actually did
not chck for deadlock,
- // but silently assume a deadlock must have been the cause for
the failed lock
if (txId != null) {
try {
rm.markTransactionForRollback(txId);
1.246 +1 -1 jakarta-slide/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-slide/build.xml,v
retrieving revision 1.245
retrieving revision 1.246
diff -u -r1.245 -r1.246
--- build.xml 30 Nov 2004 10:12:36 -0000 1.245
+++ build.xml 14 Dec 2004 12:31:24 -0000 1.246
@@ -48,7 +48,7 @@
<property name="tm-extractors.jar"
value="${lib.dir}/tm-extractors-0.4.jar"/>
<property name="ehcache.jar" value="${lib.dir}/ehcache-1.0.jar"/>
<property name="xml-im-exporter.jar"
value="${lib.dir}/xml-im-exporter1.1.jar"/>
- <property name="commons-transaction.jar"
value="${lib.dir}/commons-transaction-1.0rc1.jar"/>
+ <property name="commons-transaction.jar"
value="${lib.dir}/commons-transaction-1.1-pre-20041214.jar"/>
<property name="commons-codec.jar"
value="${lib.dir}/commons-codec-1.3.jar"/>
<property name="jakarta-slide-webdavlib.jar"
value="${lib.dir}/jakarta-slide-webdavlib-${version}.jar"/>
<!-- ===================================================================
-->
1.1
jakarta-slide/lib/commons-transaction-1.1-pre-20041214.jar
<<Binary file>>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]