Connection.close() should close its statements
Bug #790759 reported by
Patric
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
BoneCP |
Fix Released
|
High
|
Wallace Wadge |
Bug Description
Currently, BoneCP requires that all statements must be closed.
Otherwise, this may result in an OutOfMemoryError.
In fact this is violating the jdbc spec:
9.4.4 Closing Connection Objects
An application calls the method Connection.close to indicate that it has finished
using a connection. All Statement objects created from a given Connection object
will be closed when the close method for the object is called.
It should be sufficient to close the connection. It is no error when not closing statements.
(even it's a questionable style).
Changed in bonecp: | |
status: | New → Confirmed |
importance: | Undecided → Wishlist |
assignee: | nobody → Wallace Wadge (wwadge) |
Changed in bonecp: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Hi Wallace,
please note that this is not an enhancement request/wish, but a bug report with high priority, because BoneCP, which implements parts of the jdbc specification, violates the latter.
We have much "old" software code in production which do not close statements (but the connection), which is a completely correct behavior.
Without fixing this bug it would be complicated to use BoneCP as a replacement for our propritary connection pooling.
As a result, this bug has an high importance to me and may even be a blocker for BoneCP for the use within our projects.