From 4cf75860e1778f8bd3d8b10dc562b20e5871619a Mon Sep 17 00:00:00 2001
From: Yegor Bugayenko IMPORTANT: If you rely on one specific {@link Connection} instance, be careful if
* you are using it in more places, especially if more references of this class
* use it - one of those references might close the connection if you forget
- * to call {@link #autocommit(false)}
- *
* Connection connection = [...]; * DataSource ds = new StaticSource(connection); @@ -117,11 +118,12 @@ * new JdbcSession(ds) * .sql("SQL STATEMENT 2") * .execute();+ *
The above example will fail because the first JdbcSession closes * the connection, and the next one tries to work with it closed. In order to * not have this failure, the first session has to call - * {@link #autocommit(false)}, like this: - *
+ * {@link #autocommit(boolean)} with {@code false} as an argument, like this: + * ** Connection connection = [...]; * DataSource ds = new StaticSource(connection);