From c1612663feb6b78f4b42c96f0c962a3c94a76e7a Mon Sep 17 00:00:00 2001
From: ulrich
Date: Fri, 29 May 2020 08:28:42 +0000
Subject: [PATCH] Doku angepasst

---
 src/de/uhilger/baselink/PersistenceManager.java |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/de/uhilger/baselink/PersistenceManager.java b/src/de/uhilger/baselink/PersistenceManager.java
index f3f8786..66d2147 100644
--- a/src/de/uhilger/baselink/PersistenceManager.java
+++ b/src/de/uhilger/baselink/PersistenceManager.java
@@ -129,7 +129,6 @@
   /**
    * Get a database connection
    * @return  a database connection
-   * @throws SQLException
    */
   public Connection getConnection() {
     Connection c = null;
@@ -893,7 +892,7 @@
     try {
       c.setAutoCommit(false);
     } catch(SQLException ex) {
-      logger.log(Level.SEVERE, ex.getLocalizedMessage(), ex);
+      logger.log(Level.SEVERE, ex.getMessage(), ex);
     } finally {
       // ..
     }
@@ -902,22 +901,28 @@
   public void commit(Connection c) {
     try {
       c.commit();
-      c.setAutoCommit(true);
     } catch(SQLException ex) {
-      logger.log(Level.SEVERE, ex.getLocalizedMessage(), ex);
+      logger.log(Level.SEVERE, ex.getMessage(), ex);
     } finally {
-      // ... 
+      try {
+        c.setAutoCommit(true);
+      } catch (SQLException ex) {
+        logger.log(Level.SEVERE, ex.getMessage(), ex);
+      }
     }
   }
   
   public void rollback(Connection c) {
     try {
       c.rollback();
-      c.setAutoCommit(true);
     } catch(SQLException ex) {
       logger.log(Level.SEVERE, ex.getLocalizedMessage(), ex);
     } finally {
-      // ...
+      try {
+        c.setAutoCommit(true);
+      } catch (SQLException ex) {
+        logger.log(Level.SEVERE, ex.getMessage(), ex);
+      }
     }
   }
   

--
Gitblit v1.9.3