Anonymous avatar Anonymous committed 2417580

QUARTZ-762 : Rollback on a closed connection in JobStoreSupport.doCheckin()

git-svn-id: 69f7d36a-ea1c-0410-88ea-9fd03e4c9665

Comments (0)

Files changed (1)


         Connection conn = getNonManagedTXConnection();
         try {
             // Other than the first time, always checkin first to make sure there is 
-            // work to be done before we aquire the lock (since that is expensive, 
+            // work to be done before we acquire the lock (since that is expensive, 
             // and is almost never necessary).  This must be done in a separate
             // transaction to prevent a deadlock under recovery conditions.
             List failedRecords = null;
             if (firstCheckIn == false) {
-                boolean succeeded = false;
-                try {
-                    failedRecords = clusterCheckIn(conn);
-                    commitConnection(conn);
-                    succeeded = true;
-                } catch (JobPersistenceException e) {
-                    rollbackConnection(conn);
-                    throw e;
-                } finally {
-                    // Only cleanup the connection if we failed and are bailing
-                    // as we will otherwise continue to use it.
-                    if (succeeded == false) {
-                        cleanupConnection(conn);
-                    }
-                }
+                failedRecords = clusterCheckIn(conn);
+                commitConnection(conn);
             if (firstCheckIn || (failedRecords.size() > 0)) {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.