Skip to main content

Problem:

  • Product Name: Borland Enterprise Server
  • Product Version: 5.2.1
  • Product Component: JDBC Connection Pool
  • Platform/OS Version: ALL
  • JDK/Compiler Version: 1.4.1 & 1.3.1

Is there a state transition diagram available anywhere for the JDBC states?
When a connection goes to the discarded state, is it closed?

Resolution:

State diagram for JDBC Pool Connections is undocumented. Below is some information.

The pool forces a discarded state on a connection in a number of places such as:

  • An idle connection in the pool that has expired due to an IdleTimeout
  • An active connection, acquired in a transaction that has expired due to a busyTimeout
  • A connection that receives a connection error callback once in the discarded state, the pool then proceeds to physically close the connection (if possible) and any locally acquired resources.

Transition to and from this state is as follows:

conn=Datasource.getConnection  // A "Free" connection obtained and put into "NoTxBusy"
...

conn.close() / / Connection returned to pool with state changed from "NoTxBusy" to "Free"


#connection
#VisiBroker
#Security
#JDBC