Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.2
-
Fix Version/s: 1.3
-
Labels:None
-
Environment:JDK 1.5, Spring 2.5, Hibernate 3.2, Sybase JConnect 6.0, Sybase ASE 12.5
-
Number of attachments :
Description
I am receiving warning messages from the JDBC Layer upon returning the connection to the pool. Upon researching the issue I found the following:
-------------------------------------------------------
This warning is raised by ASE server each time the connection asks for a global transaction.
For a XAConnectionPool, all the transactions are globals (with two phase commit) so there is not risk to rollback a local one. You can ignore it.
For persistant connection (like in ConnectionPool), I advise you to add the following instruction : "conn.clearWarnings();" just after "Connection conn = sybDs.getConnection();" in order to limit the warning buffer size and protect you from what could look like a memory leak.
-------------------------------------------------------
I need the ability to tell BTM to invoke "conn.clearWarnings()" when the connection is either returned to the pool or prior to handing it out.
I'm not sure it worth creating a generic method invoker, but clearWarnings() should definitely be called when the connection returns to the pool.
I'll add a static call to clearWarnings() which should be good enough for now. Let's wait and see if there really is a need to call other methods when a connection is dequeued or requeued. If that's the case, I'll add such feature.