This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JDBC and the fly likes DataSource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "DataSource" Watch "DataSource" New topic
Author

DataSource

Enkita mody
Ranch Hand

Joined: Aug 06, 2012
Posts: 333

The following sample code gets a DataSource object that produces connections to the database COFFEEBREAK and uses it to update a price in the table COFFEES:
The connection in this code sample participates in connection pooling because the following are true:

  • An instance of a class implementing ConnectionPoolDataSource has been deployed.
  • An instance of a class implementing DataSource has been deployed, and the value set for its dataSourceName property is the logical name that was bound to the previously deployed ConnectionPoolDataSource object.

  • Source:http://docs.oracle.com/javase/tutorial/jdbc/basics/sqldatasources.html#pooled_connection

    I couldn't figure out where this class is implementing ConnectionPoolDataSource interface as written above?


    OCA7
     
    GeeCON Prague 2014
     
    subject: DataSource