What is a JDBC 2.0 DataSource?

Joe Sam Shirah

The DataSource class was introduced in the JDBC 2.0 Optional Package as an easier, more generic means of obtaining a Connection. The actual driver providing services is defined to the DataSource outside the application ( Of course, a production quality app can and should provide this information outside the app anyway, usually with properties files or ResourceBundles ). The documentation expresses the view that DataSource will replace the common DriverManager method.

Some downsides are: 1) Vendor specific set up tools must be used, with no particular standards specified. To quote from the source: "Now he ( the developer - JS ) needs to have his system administrator, SoLan, deploy the DataSource objects so that he... can start using them". 2) JNDI must be used to implement a lookup for the DataSource.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact