Default auto-commit of false is counter-intuitive and undocumented

Bug #1118793 reported by Kevin Locke
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
BoneCP
Fix Released
Undecided
Unassigned

Bug Description

In BoneCP 0.8.0-rc1, it appears that defaultAutoCommit in BoneCPConfig is false. This is the opposite of the documented behavior of JDBC "When a connection is created, it is in auto-commit mode." (from <http://docs.oracle.com/javase/tutorial/jdbc/basics/transactions.html>) and different than the JavaDocs for BoneCPConfig.setDefaultAutoCommit which states that "If not set, use driver default." I would urge you to consider defaulting this to true.

Note: I discovered this due to an exception being thrown from setReadOnly when called by the ConnectionHandle constructor from recreateConnectionHandle when the connection handle is closed due to the transaction not being closed. Even if the default is fixed, this will still occur if the user disables auto-commit and neglects to commit/rollback (even when only SELECT queries are made). I am not sure if this is intended or not (the behavior of close when in a transaction appears to be unspecified).

Revision history for this message
Wallace Wadge (wwadge) wrote :

Confirmed and fixed.

Changed in bonecp:
status: New → Fix Committed
Victor S (n-victor)
Changed in bonecp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.