[java-plugin-storage-jdbc] branch main updated: JJDBC-30 Incomplete SQL transaction in create()

Rod Widdowson rdw at steadingsoftware.com
Wed Sep 25 10:07:55 UTC 2024


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch main
in repository java-plugin-storage-jdbc.

View the commit online:
http://git.shibboleth.net/view/?p=java-plugin-storage-jdbc.git;a=commit;h=0abd311d7e4c65a9a4fd2819edc1a104e57b26e9

The following commit(s) were added to refs/heads/main by this push:
     new 0abd311  JJDBC-30 Incomplete SQL transaction in create()
0abd311 is described below

commit 0abd311d7e4c65a9a4fd2819edc1a104e57b26e9
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Wed Sep 25 11:07:01 2024 +0100

    JJDBC-30 Incomplete SQL transaction in create()
    
    https://shibboleth.atlassian.net/browse/JJDBC-30
    
    Tidy up previous:
      * detabify (we hates the eclipses)
      * remove a couple of extraneous extra commits on autocommit paths
---
 .../shibboleth/plugin/storage/jdbc/impl/JDBCStorageService.java  | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageService.java b/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageService.java
index d0b5ff1..8ef3c4c 100644
--- a/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageService.java
+++ b/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageService.java
@@ -1000,7 +1000,6 @@ public final class JDBCStorageService extends AbstractStorageService
                 setExpires(updateStmnt, 2, expires);
                 log.trace("Reap:: '{}':  1: '{}' ; 2: '{}' ;", deleteByContextExpiredSQL, context, expires);
                 updateStmnt.execute();
-                connection.commit();
                 return;
             } catch (final SQLException e) {
                 boolean retry = false;
@@ -1042,7 +1041,6 @@ public final class JDBCStorageService extends AbstractStorageService
                 log.trace("UpdateContextExpiration:: '{}':  1: '{}' ; 2: '{}' ; 3: '{}' ;",
                           updateExpiresByContextSQL, expires, context, newExpires);
                 updateStmnt.execute();
-                connection.commit();
                 return;
             } catch (final SQLException e) {
                 boolean retry = false;
@@ -1244,16 +1242,15 @@ public final class JDBCStorageService extends AbstractStorageService
         /** The lock we may or may not have set up. */
         @Nullable private  final Lock threadLock;
         
-        
         /** Was this created autocommit? */
         private final boolean isAutoCommit;
-        
+
         /** Has {@link #commit()} been called? */
         private boolean isCommited;
-        
+
         /** Has {@link #rollback()} been called? */
         private boolean isRolledBack;
-        
+
         /** Constructor.
          * @param autoCommit What to set {@link Connection#setAutoCommit(boolean)} to
          * @param writeLock Whether to grab an write lock on the table (if we are locking)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list