Oracle JDBC API Reference
12c Release 1 ("12.1.0.2.0")
E17663-03

oracle.jdbc.replay
Class OracleConnectionPoolDataSourceImpl

java.lang.Object
  extended by oracle.jdbc.replay.OracleDataSourceImpl
      extended by oracle.jdbc.replay.OracleConnectionPoolDataSourceImpl
All Implemented Interfaces:
Serializable, Wrapper, Referenceable, ObjectFactory, CommonDataSource, ConnectionPoolDataSource, DataSource, OracleConnectionPoolDataSource, OracleDataSource

public class OracleConnectionPoolDataSourceImpl
extends OracleDataSourceImpl
implements oracle.jdbc.replay.internal.OracleConnectionPoolDataSource, Serializable, Referenceable, ObjectFactory

See Also:
Serialized Form

Field Summary
 
Fields inherited from class oracle.jdbc.replay.OracleDataSourceImpl
password, user
 
Fields inherited from interface oracle.jdbc.replay.OracleDataSource
CONNECTION_PROPERTIES, DATA_SOURCE_NAME, DATABASE_NAME, DESCRIPTION, EXPLICIT_CACHING_ENABLED, IMPLICIT_CACHING_ENABLED, MAX_STATEMENTS, NETWORK_PROTOCOL, PASSWORD, PORT_NUMBER, ROLE_NAME, SERVER_NAME, URL, USER
 
Constructor Summary
OracleConnectionPoolDataSourceImpl()
           
 
Method Summary
 Connection getConnection()
           
 Connection getConnection(Properties props)
           
 Connection getConnection(String usr, String pwd)
          Attempts to obtain a database connection with the specified user and password.
 Connection getConnection(String usr, String pwd, Properties props)
           
protected  Connection getPhysicalConnection()
          Gets a physical connection with default url, user name, and password.
protected  Connection getPhysicalConnection(String _user, String _passwd)
          Gets a physical connection with the default URL and given user name and password.
protected  Connection getPhysicalConnection(String _url, String _user, String _passwd)
          Gets a physical connection with the given url, user name, and password.
 PooledConnection getPooledConnection()
          Attempts to establish a database connection.
 PooledConnection getPooledConnection(String _user, String _passwd)
          Attempts to establish a database connection.
 
Methods inherited from class oracle.jdbc.replay.OracleDataSourceImpl
clearReplayStatistics, getConnectionInitializationCallback, getConnectionNoProxy, getConnectionProperties, getConnectionProperty, getDatabaseName, getDataSourceName, getDescription, getExplicitCachingEnabled, getImplicitCachingEnabled, getLoginTimeout, getLogWriter, getMaxStatements, getNetworkProtocol, getObjectInstance, getParentLogger, getPortNumber, getProxyFactory, getReference, getReplayStatistics, getRoleName, getServerName, getURL, getUser, isWrapperFor, registerConnectionInitializationCallback, setConnectionProperties, setConnectionProperty, setDatabaseName, setDataSourceName, setDescription, setExplicitCachingEnabled, setImplicitCachingEnabled, setLoginTimeout, setLogWriter, setMaxStatements, setNetworkProtocol, setPassword, setPortNumber, setRoleName, setServerName, setURL, setUser, unregisterConnectionInitializationCallback, unwrap, updateReplayStatistics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.jdbc.replay.internal.OracleDataSource
getConnectionNoProxy, getProxyFactory, updateReplayStatistics
 
Methods inherited from interface oracle.jdbc.replay.OracleDataSource
clearReplayStatistics, getConnectionInitializationCallback, getConnectionProperties, getConnectionProperty, getDatabaseName, getDataSourceName, getDescription, getExplicitCachingEnabled, getImplicitCachingEnabled, getMaxStatements, getNetworkProtocol, getPortNumber, getReplayStatistics, getRoleName, getServerName, getURL, getUser, registerConnectionInitializationCallback, setConnectionProperties, setConnectionProperty, setDatabaseName, setDataSourceName, setDescription, setExplicitCachingEnabled, setImplicitCachingEnabled, setMaxStatements, setNetworkProtocol, setPassword, setPortNumber, setRoleName, setServerName, setURL, setUser, unregisterConnectionInitializationCallback
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 
Methods inherited from interface javax.naming.Referenceable
getReference
 
Methods inherited from interface javax.naming.spi.ObjectFactory
getObjectInstance
 

Constructor Detail

OracleConnectionPoolDataSourceImpl

public OracleConnectionPoolDataSourceImpl()
Method Detail

getPooledConnection

public PooledConnection getPooledConnection()
                                     throws SQLException
Attempts to establish a database connection.

Specified by:
getPooledConnection in interface ConnectionPoolDataSource
Specified by:
getPooledConnection in interface OracleConnectionPoolDataSource
Returns:
A PooledConnection to the database
Throws:
SQLException - if a database-access error occurs.

getPooledConnection

public PooledConnection getPooledConnection(String _user,
                                            String _passwd)
                                     throws SQLException
Attempts to establish a database connection.

Specified by:
getPooledConnection in interface ConnectionPoolDataSource
Specified by:
getPooledConnection in interface OracleConnectionPoolDataSource
Parameters:
user - The database user on whose behalf the Connection is being made.
password - The user's password
Returns:
a PooledConnection to the database
Throws:
SQLException - if a database-access error occurs.

getConnection

public Connection getConnection()
                         throws SQLException
Specified by:
getConnection in interface DataSource
Overrides:
getConnection in class OracleDataSourceImpl
Throws:
SQLException

getConnection

public Connection getConnection(String usr,
                                String pwd)
                         throws SQLException
Description copied from class: OracleDataSourceImpl
Attempts to obtain a database connection with the specified user and password.

Specified by:
getConnection in interface DataSource
Overrides:
getConnection in class OracleDataSourceImpl
Parameters:
usr - The database user on whose behalf the connection is being made.
pwd - The user's password.
Returns:
A Connection to the database.
Throws:
SQLException - if a database-access error occurs.

getConnection

public Connection getConnection(Properties props)
                         throws SQLException
Throws:
SQLException

getConnection

public Connection getConnection(String usr,
                                String pwd,
                                Properties props)
                         throws SQLException
Throws:
SQLException

getPhysicalConnection

protected Connection getPhysicalConnection()
                                    throws SQLException
Gets a physical connection with default url, user name, and password.

Returns:
A Connection to the database
Throws:
SQLException - if a database-access error occurs.

getPhysicalConnection

protected Connection getPhysicalConnection(String _url,
                                           String _user,
                                           String _passwd)
                                    throws SQLException
Gets a physical connection with the given url, user name, and password.

Parameters:
_url - The connect url.
_user - The database user on whose behalf the connection is being made.
_passwd - The user's password
Returns:
a Connection to the database
Throws:
SQLException - if a database-access error occurs.

getPhysicalConnection

protected Connection getPhysicalConnection(String _user,
                                           String _passwd)
                                    throws SQLException
Gets a physical connection with the default URL and given user name and password.

Parameters:
_user - The database user on whose behalf the connection is being made.
_passwd - The user's password
Returns:
a Connection to the database
Throws:
SQLException - if a database-access error occurs.

Oracle JDBC API Reference
12c Release 1 ("12.1.0.2.0")
E17663-03

Copyright © 2008, 2013, Oracle. All rights reserved.