From c99f377709cc7f644c048f20bbba03ffe44fd745 Mon Sep 17 00:00:00 2001 From: ulrich Date: Tue, 17 Jan 2017 17:41:51 +0000 Subject: [PATCH] Dokumentation (in Arbeit) --- src/de/uhilger/baselink/PersistenceManager.java | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/de/uhilger/baselink/PersistenceManager.java b/src/de/uhilger/baselink/PersistenceManager.java index f3f8786..bd7ce34 100644 --- a/src/de/uhilger/baselink/PersistenceManager.java +++ b/src/de/uhilger/baselink/PersistenceManager.java @@ -893,7 +893,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 +902,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