Using DataSource Objects to Get a Connection
by, 03-10-2012 at 08:54 AM (995 Views)
Classes instantiate object which implement Datasource. This presents particular some data source like a file, or DBMS.
A particular DBMS is presented by a DataSource object. For more than 1 data source usage, it is required to have separate DataSource objects for every data source. There are 3 ways for implementation of the DataSource interface.
- Standard Connection objects are produced by the implementation of basic DataSource. These objects are not used or pooled in any distributed transaction.
- Implementation of a DataSource which gives connection pooling support brings forward the Connection objects which take part in connection pooling. This means that recycling of connections is possible.
- AConnection objects are produced by the DataSource implementation, which provides support to distributed transactions.