IT. Expert System.

Android Reference

DataSource


javax.sql

Interface DataSource

  • All Superinterfaces:
    CommonDataSource, Wrapper


    public interface DataSource
    extends CommonDataSource, Wrapper
    An interface for the creation of Connection objects which represent a connection to a database. This interface is an alternative to the java.sql.DriverManager.

    A class which implements the DataSource interface is typically registered with a JNDI naming service directory and is retrieved from there by name.

    The DataSource interface is typically implemented by the writer of a JDBC driver. There are three variants of the DataSource interface, which produce connections with different characteristics:

    1. Standard DataSource: produces standard Connection objects with no special features.
    2. Connection Pool DataSource: produces PooledConnection objects which require a connection pool manager as an intermediary component.
    3. Distributed transaction DataSource ("XADataSource"): produces XAConnection objects which can be used to handle distributed transactions which typically require an intermediary transaction manager component. XAConnection objects also provide connection pooling capabilities as well as distributed transaction capabilities.

    Note that a JDBC driver which is accessed via the DataSource interface is loaded via a JNDI lookup process. A driver loaded in this way does not register itself with the DriverManager.

    • Method Detail

      • getConnection

        Connection getConnection()
                                 throws SQLException
        Creates a connection to the database represented by this DataSource.
        Returns:
        a Connection object which is a connection to the database.
        Throws:
        SQLException - if there is a problem accessing the database.
      • getConnection

        Connection getConnection(String theUsername,
                               String thePassword)
                                 throws SQLException
        Creates a connection to the database represented by this DataSource, using the supplied user name and password.
        Parameters:
        theUsername - the a user name for the database login.
        thePassword - the password associated with the user identified by theUsername.
        Returns:
        the Connection object which is the connection to the database.
        Throws:
        SQLException - if there is a problem accessing the database.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1932 / . Delta: 0.01656 с