geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r375854 - in /geronimo/trunk/modules/transaction/src: java/org/apache/geronimo/transaction/log/HOWLLog.java test/org/apache/geronimo/transaction/log/HOWLLogTest.java test/org/apache/geronimo/transaction/manager/HOWLLogRecoveryTest.java
Date Wed, 08 Feb 2006 05:13:06 GMT
Author: djencks
Date: Tue Feb  7 21:13:03 2006
New Revision: 375854

URL: http://svn.apache.org/viewcvs?rev=375854&view=rev
Log:
GERONIMO-1599 temporary fix for broken recovery.  Shows the danger of working too fast and
insufficient testing.

Modified:
    geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/log/HOWLLog.java
    geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/log/HOWLLogTest.java
    geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/HOWLLogRecoveryTest.java

Modified: geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/log/HOWLLog.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/log/HOWLLog.java?rev=375854&r1=375853&r2=375854&view=diff
==============================================================================
--- 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 Feb  7 21:13:03 2006
@@ -66,12 +66,12 @@
     private final ServerInfo serverInfo;
     private String logFileDir;
 
-    private final XidFactory xidFactory;
+//    private final XidFactory xidFactory;
 
     private final XALogger logger;
     private final Configuration configuration = new Configuration();
     private boolean started = false;
-    private HashMap recovered;
+//    private HashMap recovered;
 
     public HOWLLog(String bufferClassName,
                    int bufferSize,
@@ -85,7 +85,7 @@
                    int maxLogFiles,
                    int minBuffers,
                    int threadsWaitingForceThreshold,
-                   XidFactory xidFactory,
+//                   XidFactory xidFactory,
                    ServerInfo serverInfo) throws IOException, LogConfigurationException {
         this.serverInfo = serverInfo;
         setBufferClassName(bufferClassName);
@@ -101,7 +101,7 @@
         setMaxLogFiles(maxLogFiles);
         setMinBuffers(minBuffers);
         setThreadsWaitingForceThreshold(threadsWaitingForceThreshold);
-        this.xidFactory = xidFactory;
+//        this.xidFactory = xidFactory;
         this.logger = new XALogger(configuration);
     }
 
@@ -211,21 +211,21 @@
     public void doStart() throws Exception {
         started = true;
         setLogFileDir(logFileDir);
-        log.debug("Initiating transaction manager recovery");
-        recovered = new HashMap();
+//        log.debug("Initiating transaction manager recovery");
+//        recovered = new HashMap();
 
         logger.open(null);
 
-        ReplayListener replayListener = new GeronimoReplayListener(xidFactory, recovered);
-        logger.replayActiveTx(replayListener);
+//        ReplayListener replayListener = new GeronimoReplayListener(xidFactory, recovered);
+//        logger.replayActiveTx(replayListener);
 
-        log.debug("In doubt transactions recovered from log");
+//        log.debug("In doubt transactions recovered from log");
     }
 
     public void doStop() throws Exception {
         started = false;
         logger.close();
-        recovered = null;
+//        recovered = null;
     }
 
     public void doFail() {
@@ -309,6 +309,11 @@
     }
 
     public Collection recover(XidFactory xidFactory) throws LogException {
+        log.debug("Initiating transaction manager recovery");
+        Map recovered = new HashMap();
+        ReplayListener replayListener = new GeronimoReplayListener(xidFactory, recovered);
+        logger.replayActiveTx(replayListener);
+        log.debug("In doubt transactions recovered from log");
         return recovered.values();
     }
 
@@ -408,7 +413,7 @@
         infoFactory.addAttribute("minBuffers", Integer.TYPE, true);
         infoFactory.addAttribute("threadsWaitingForceThreshold", Integer.TYPE, true);
 
-        infoFactory.addReference("XidFactory", XidFactory.class, NameFactory.XID_FACTORY);
+//        infoFactory.addReference("XidFactory", XidFactory.class, NameFactory.XID_FACTORY);
         infoFactory.addReference("ServerInfo", ServerInfo.class, NameFactory.GERONIMO_SERVICE);
 
         infoFactory.addInterface(TransactionLog.class);
@@ -426,7 +431,7 @@
             "maxLogFiles",
             "minBuffers",
             "threadsWaitingForceThreshold",
-            "XidFactory",
+//            "XidFactory",
             "ServerInfo"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/log/HOWLLogTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/log/HOWLLogTest.java?rev=375854&r1=375853&r2=375854&view=diff
==============================================================================
--- geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/log/HOWLLogTest.java
(original)
+++ geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/log/HOWLLogTest.java
Tue Feb  7 21:13:03 2006
@@ -62,7 +62,8 @@
                 2, //                "maxLogFiles",
                 2, //                "minBuffers",
                 10,//                "threadsWaitingForceThreshold"});
-                xidFactory, new BasicServerInfo(new File(basedir, "target").getAbsolutePath())
+//                xidFactory,
+                new BasicServerInfo(new File(basedir, "target").getAbsolutePath())
         );
         howlLog.doStart();
         return howlLog;

Modified: geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/HOWLLogRecoveryTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/HOWLLogRecoveryTest.java?rev=375854&r1=375853&r2=375854&view=diff
==============================================================================
--- geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/HOWLLogRecoveryTest.java
(original)
+++ geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/HOWLLogRecoveryTest.java
Tue Feb  7 21:13:03 2006
@@ -71,7 +71,7 @@
                 2, //                "maxLogFiles",
                 2, //                "minBuffers",
                 10,//                "threadsWaitingForceThreshold"});
-                xidFactory,
+//                xidFactory,
                 new BasicServerInfo(targetDir)
         );
         howlLog.doStart();



Mime
View raw message