I have been somewhat away from Java EE for a while, but I have a basic idea of all this stuff.
I am reading the JTDS docs here:
http://jtds.sourceforge.net/features.html
It says it provides statement pooling, and connection pooling, but does not provide a connection pool implementation.
Feel free to add more details to your answer
(whatever you find important; things I didn't ask explicitly about)
as I am quite confused with this.
As far as I can tell from the API documentation, they mean that jTDS provides a javax.sql.PooledConnection
and a javax.sql.ConnectionPoolDataSource
implementation. These classes are to be used by a connection pool of - for example - a Java EE application server, and are not a connection pool itself.
The ConnectionPoolDataSource
creates PooledConnection
objects, or in other words it is the data source for a connection pool. The PooledConnection
is the handle for the physical connection, and is held within the connection pool. When a user asks for a connection from the pool, the connection pool moves the PooledConnection
from the 'available' to the 'in use' list, and obtains a logical java.sql.Connection
from the PooledConnection
. This logical connection is what is handed to the user.
The PooledConnection
can be use by the connection pool to monitor the logical connection. For example to return the PooledConnection
to 'available' when close()
is called, or forcibly revoke and invalidate the logical connection (eg if it is in use too long).
So jTDS does not have a connection pool implementation itself, but it has the support for a connection pool. It is unfortunate that the wording in the JDBC specification is so confusing.
I have a more detailed answer on this subject on a similar question.