diff --git a/src/client/jTPCCUtil.java b/src/client/jTPCCUtil.java index 140b4802f56530bfb3daad1b8dd6428da1ca70a5..f09875a022a43c6df5c9d9f773fe00e6175293ac 100644 --- a/src/client/jTPCCUtil.java +++ b/src/client/jTPCCUtil.java @@ -70,6 +70,7 @@ public class jTPCCUtil implements jTPCCConfig ResultSet rs; String value; + try { if (dbConn == null) { dbConn = ShardingJdbc.getConnection(db, dbProps); @@ -86,6 +87,12 @@ public class jTPCCUtil implements jTPCCConfig rs.close(); return value; + } finally { + stmtGetConfig.close(); + stmtGetConfig = null; + dbConn.close(); + dbConn = null; + } } } // end jTPCCUtil