View RSS Feed

JDBC

Java Database Connectivity (JDBC) examples. SQL with Java.

  1. Advantages of DataSource Objects

    by , 04-27-2012 at 07:05 PM
    Because of its properties, a DataSource object is a better alternative than the DriverManager class for getting a connection. Programmers no longer have to hard code the driver name or JDBC URL in their applications, which makes them more portable. Also, DataSource properties make maintaining code much simpler. If there is a change, the system administrator can update data source properties and not be concerned about changing every application that makes a connection to the data source. For example, ...
  2. Using DataSource Objects to Get a Connection

    by , 04-27-2012 at 07:04 PM
    Objects instantiated by classes that implement the DataSource represent a particular DBMS or some other data source, such as a file. A DataSource object represents a particular DBMS or some other data source, such as a file. If a company uses more than one data source, it will deploy a separate DataSource object for each of them. The DataSource interface is implemented by a driver vendor. It can be implemented in three different ways:

    A basic DataSource implementation produces standard ...
    Categories
    Connection