diff --git a/trunk/sqltoy-orm-solon-plugin/src/main/java/org/sagacity/sqltoy/solon/integration/SolonConnectionFactory.java b/trunk/sqltoy-orm-solon-plugin/src/main/java/org/sagacity/sqltoy/solon/integration/SolonConnectionFactory.java index 09fa360216b3c8abae9557aa955048842c8208c2..ee4db646322ae027c1f54b4ecfd9b69e820d1486 100644 --- a/trunk/sqltoy-orm-solon-plugin/src/main/java/org/sagacity/sqltoy/solon/integration/SolonConnectionFactory.java +++ b/trunk/sqltoy-orm-solon-plugin/src/main/java/org/sagacity/sqltoy/solon/integration/SolonConnectionFactory.java @@ -12,7 +12,7 @@ public class SolonConnectionFactory implements ConnectionFactory { @Override public Connection getConnection(DataSource dataSource) { try { - return TranUtils.getConnection(dataSource); + return TranUtils.getConnectionProxy(dataSource); } catch (SQLException e) { throw new RuntimeException(e); } @@ -20,14 +20,12 @@ public class SolonConnectionFactory implements ConnectionFactory { @Override public void releaseConnection(Connection connection, DataSource dataSource) { - if (!TranUtils.inTrans()) { - try { - if (connection != null) { - connection.close(); - } - } catch (SQLException e) { - e.printStackTrace(); + try { + if (connection != null) { + connection.close(); } + } catch (SQLException e) { + e.printStackTrace(); } } }