The data source pool maintains physical connections to the database. At first you get min-pool-size connections, and as you need more, you can have up to max-pool-size connections. And those are all physical connection. You can use the ManagedConnectionPool mbean to see how many physical connections are made and how many are in use.
When you ask the DataSource for a connection, it gives you an available connection (which is physical). When you close that connection, the DataSource keeps the physical connection with the database open and simply returns the connection object to the pool for the next requestor to use.
for 1) and 2), those classes are provided by the Sybase driver as data source implementations for stand-alone Java apps; they are not for use within JBoss AS which provides its own data source. For the driver-class, you must specify a driver implementation, not a data source implementation.
3) This class would be used in a distributed transaction environment. Look at the docs/examples/jca/*-xa-ds.xml file for examples on how to configure them.
Joined: Nov 13, 2008
Hi Peter Johnson
The example file in docs/examples/jca/sybase-ds.xml had the following
which misguided me to specify a datasource in the driver class. Also, when i saw 3 different types of datasources implemented in sybase i got even more confused.
Anyway i got my connection pooling implemented :-) by specifying com.sybase.jdbc2.jdbc.SybDriver in the driver class. Got it verified by checking the parameters in jmx-console
Actually com.sybase.jdbc2.jdbc.SybDataSource class is extending com.sybase.jdbc2.jdbc.SybDriver class and that is why am not getting any errors when i specify the datasource class instead of a driver class.
Correct me if am wrong again..