You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2004/10/12 21:50:05 UTC
svn commit: rev 54691 - geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/log
Author: djencks
Date: Tue Oct 12 12:50:04 2004
New Revision: 54691
Modified:
geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/log/HOWLLog.java
Log:
avoid problems if the tx we are rollng back wasn't prepared
Modified: geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/log/HOWLLog.java
==============================================================================
--- geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/log/HOWLLog.java (original)
+++ geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/log/HOWLLog.java Tue Oct 12 12:50:04 2004
@@ -54,11 +54,8 @@
import org.objectweb.howl.log.ReplayListener;
/**
- *
- *
* @version $Rev$ $Date$
- *
- * */
+ */
public class HOWLLog implements TransactionLog, GBeanLifecycle {
static final byte PREPARE = 1;
static final byte COMMIT = 2;
@@ -77,21 +74,19 @@
private final SortedSet marks = new TreeSet();
- public HOWLLog(
- String bufferClassName,
- int bufferSize,
- boolean checksumEnabled,
- int flushSleepTimeMilliseconds,
- String logFileDir,
- String logFileExt,
- String logFileName,
- int maxBlocksPerFile,
- int maxBuffers,
- int maxLogFiles,
- int minBuffers,
- int threadsWaitingForceThreshold,
- ServerInfo serverInfo
- ) throws IOException, LogConfigurationException {
+ public HOWLLog(String bufferClassName,
+ int bufferSize,
+ boolean checksumEnabled,
+ int flushSleepTimeMilliseconds,
+ String logFileDir,
+ String logFileExt,
+ String logFileName,
+ int maxBlocksPerFile,
+ int maxBuffers,
+ int maxLogFiles,
+ int minBuffers,
+ int threadsWaitingForceThreshold,
+ ServerInfo serverInfo) throws IOException, LogConfigurationException {
this.serverInfo = serverInfo;
setBufferClassName(bufferClassName);
setBufferSizeKBytes(bufferSize);
@@ -324,8 +319,10 @@
boolean doMark = false;
Long mark = new Long(logMark);
synchronized (marks) {
- doMark = (mark.equals(marks.first()));
- marks.remove(mark);
+ if (!marks.isEmpty()) {
+ doMark = (mark.equals(marks.first()));
+ marks.remove(mark);
+ }
}
return doMark;
}