From b5748a4f0aaadef490d84be234df08ac8cfc0685 Mon Sep 17 00:00:00 2001 From: ulrich <ulrich@uhilger.de> Date: Tue, 17 Jan 2017 06:00:38 +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