Skip navigation links

Oracle®Database JDBC Java API Reference
12c Release 1 (12.1.0.2)
E56669-01


oracle.jdbc.pool
Class OracleDataSource

java.lang.Object
  extended by oracle.jdbc.pool.OracleDataSource

All Implemented Interfaces:
Serializable, Wrapper, Referenceable, CommonDataSource, DataSource
Direct Known Subclasses:
OracleConnectionPoolDataSource, OracleOCIConnectionPool

public class OracleDataSource
extends Object
implements DataSource, Serializable, Referenceable

A DataSource object is a factory for Connection objects. An object that implements the DataSource interface will typically be registered with a JNDI service provider. A JDBC driver that is accessed via the DataSource API does not automatically register itself with the DriverManager.

See Also:
Serialized Form

Field Summary
protected  OracleConnectionCacheManager cacheManager
           
protected  String connCacheName
           
protected  Properties connCacheProperties
           
protected  boolean connCachingEnabled
           
protected  Properties connectionProperties
           
protected  String databaseName
           
protected  String dataSourceName
           
protected  String description
           
protected  oracle.jdbc.driver.OracleDriver driver
           
protected  String driverType
           
protected  boolean explicitCachingEnabled
           
protected  boolean explicitCachingEnabledSet
           
protected  boolean fastConnFailover
           
protected  boolean implicitCachingEnabled
           
protected  boolean implicitCachingEnabledSet
           
 boolean isOracleDataSource
           
protected  int loginTimeout
           
protected  PrintWriter logWriter
           
protected  int maxStatements
           
protected  boolean maxStatementsSet
           
protected  String networkProtocol
           
protected  oracle.jdbc.pool.OracleImplicitConnectionCache odsCache
           
protected  String onsConfigStr
           
protected  oracle.jdbc.internal.OpaqueString password
           
protected  int portNumber
           
protected  String serverName
           
protected  String serviceName
           
protected  String tnsEntry
           
static boolean TRACE
           
protected  String url
           
protected  String user
           

 

Constructor Summary
OracleDataSource()
           

 

Method Summary
protected  void addRefProperties(Reference ref)
           
 void close()
          Deprecated. Use Oracle Universal Connection Pool instead.

Close DataSource API. This removes the associated Connection Cache and frees resources. This must be the last method to invoke, after the user is finished using a cache enabled DataSource.

protected  void copy(OracleDataSource ds)
           
 Connection getConnection()
          Attempt to establish a database connection.
 Connection getConnection(Properties cachedConnectionAttributes)
          Deprecated. Use Oracle Universal Connection Pool instead.

Attempt to obtain a database connection from the Implicit Connection Cache using Connection Attributes

 Connection getConnection(String _user, String _passwd)
          Attempt to establish a database connection.
 Connection getConnection(String _user, String _passwd, Properties cachedConnectionAttributes)
          Deprecated. Use Oracle Universal Connection Pool instead.

Attempt to obtain a database connection from the Implicit Connection Cache using user, passwd and Connection Attributes

 String getConnectionCacheName()
           
 Properties getConnectionCacheProperties()
           
 boolean getConnectionCachingEnabled()
           
protected  oracle.jdbc.internal.OracleConnection getConnectionDuringExceptionHandling()
           
 Properties getConnectionProperties()
          getConnectionProperties Returns the current Properties set in the datasource.
 String getDatabaseName()
          Get the name of the database set on this DataSource instance.
 String getDataSourceName()
          Get the datasource name for this instance if set.
 String getDescription()
          Get the Desciption of this data source.
 String getDriverType()
          Get the Oracle JDBC driver type set for this datasource instance
 boolean getExplicitCachingEnabled()
          getExplicitCachingEnabled Returns the current value of the explicitCachingEnabled property.
 boolean getFastConnectionFailoverEnabled()
           
 boolean getImplicitCachingEnabled()
          getImplicitCachingEnabled Returns the current value of the implicitCachingEnabled property.
 int getLoginTimeout()
          Gets the maximum time in seconds that this data source can wait while attempting to connect to a database.
 PrintWriter getLogWriter()
          Get the log writer for this data source.
 int getMaxStatements()
          getMaxStatements Returns the current value of the maxStatements property.
 String getNetworkProtocol()
          Get the network protocol set.
 String getONSConfiguration()
          Deprecated. Use Oracle Universal Connection Pool instead.

Return the ONS configuration string that is used for remote ONS subscription, in the form specified in setONSConfiguration(String). This is used by Fast Connection Failover and Runtime Load Balancing.

 Logger getParentLogger()
           
protected  String getPassword()
           
protected  Connection getPhysicalConnection(Properties prop)
           
 int getPortNumber()
          Get the port number on which server is listening for requests.
 Reference getReference()
           
 String getServerName()
          Get the name of the server on which database is running.
 String getServiceName()
          Get the service_name To distinguish services from instances, a new URL using service_name is added, existing url with SID will be supported, but deprecated.
 String getTNSEntryName()
          Get the TNS entry name for this instance if set.
 String getURL()
          Get the URL for this datasource.
 String getUser()
          Get the user name for this datasource.
 boolean isWrapperFor(Class<?> iface)
          Since this class is not a wrapper, just check to see if this implements the requested interface.
 void setConnectionCacheName(String cacheName)
           
 void setConnectionCacheProperties(Properties cp)
          Deprecated. Use Oracle Universal Connection Pool instead.

Setter method to set one or more Implicit Connection Cache properties. If a null value is set, default values will take effect. Below are the list of properties supported. These are the keys (case sensitive) to be used when setting their appropriate values.

 void setConnectionCachingEnabled(boolean flag)
          Deprecated. Use Oracle Universal Connection Pool instead.

Setter method to enable Implicit Connection Caching

 void setConnectionProperties(Properties value)
          Sets the Connection Properties for the datasource
 void setDatabaseName(String dbname)
          Set the name of a particular database on a server.
 void setDataSourceName(String dsname)
          Set the DataSourceName.
 void setDescription(String des)
          Set the Desciption for this data source instance.
 void setDriverType(String dt)
          Set the JDBC driver type.
 void setExplicitCachingEnabled(boolean cache)
          setExplicitCachingEnabled Sets the value of the explicitCachingEnabled property, which enables or disables the explicit cache.
 void setFastConnectionFailoverEnabled(boolean flag)
           
 void setImplicitCachingEnabled(boolean cache)
          setImplicitCachingEnabled Sets the value of the implicitCachingEnabled property, which enables or disables the implicit cache.
 void setLoginTimeout(int timeout)
          Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.
 void setLogWriter(PrintWriter pw)
          Set the log writer for this data source.
 void setMaxStatements(int max)
          Deprecated.  
 void setNetworkProtocol(String np)
          Set the network protocol for the connections.
 void setONSConfiguration(String onsConfigStr)
          Deprecated. Use Oracle Universal Connection Pool instead.

Set the configuration string used for remote ONS subscription. The parameter string closely resembles the content of the ONS configuration file "ons.config", and contains a list of "<name>=<value>" pairs separated by newline character '\n', where <name> can be one of "nodes", "walletfile", or "walletpassword". The parameter string should at least specify the ONS configuration attribute "nodes", as a list of host:port pairs separated by comma ','. SSL would be used when the "walletfile" attribute is specified as an Oracle wallet file.

An example ONS configuration string:

      "nodes=host1:4200,host2:4200\nwalletfile=wfile\nwalletpassword=wpwd"
    

This is used primarily by Fast Connection Failover and Runtime Load Balancing.

 void setPassword(String pd)
          Set the password with which connections have to be obtained.
 void setPortNumber(int pn)
          Set the port number where a server is listening for requests.
 void setServerName(String sn)
          Set the name of the Server on which database is running.
 void setServiceName(String svcname)
          Set the service_name of a database on a server.
 void setTNSEntryName(String dbname)
          Set the TNS entry name.
 void setURL(String url)
          Set the URL from which connections have to be obtained.
 void setUser(String userName)
          Set the user name with which connections have to be obtained.
protected  void trace(String s)
           
<T> T
unwrap(Class<T> iface)
          Since this class is not a wrapper, just check to see if this implements the requested interface.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

logWriter

protected PrintWriter logWriter

loginTimeout

protected int loginTimeout

databaseName

protected String databaseName

serviceName

protected String serviceName

dataSourceName

protected String dataSourceName

description

protected String description

networkProtocol

protected String networkProtocol

portNumber

protected int portNumber

user

protected String user

password

protected oracle.jdbc.internal.OpaqueString password

serverName

protected String serverName

url

protected String url

driverType

protected String driverType

tnsEntry

protected String tnsEntry

maxStatements

protected int maxStatements

implicitCachingEnabled

protected boolean implicitCachingEnabled

explicitCachingEnabled

protected boolean explicitCachingEnabled

maxStatementsSet

protected boolean maxStatementsSet

implicitCachingEnabledSet

protected boolean implicitCachingEnabledSet

explicitCachingEnabledSet

protected boolean explicitCachingEnabledSet

odsCache

protected transient oracle.jdbc.pool.OracleImplicitConnectionCache odsCache

cacheManager

protected transient OracleConnectionCacheManager cacheManager

connCacheName

protected String connCacheName

connCacheProperties

protected Properties connCacheProperties

connectionProperties

protected Properties connectionProperties

connCachingEnabled

protected boolean connCachingEnabled

fastConnFailover

protected boolean fastConnFailover

onsConfigStr

protected String onsConfigStr

isOracleDataSource

public boolean isOracleDataSource

driver

protected transient oracle.jdbc.driver.OracleDriver driver

TRACE

public static final boolean TRACE
See Also:
Constant Field Values

Constructor Detail

OracleDataSource

public OracleDataSource()
                 throws SQLException
Throws:
SQLException

Method Detail

getConnection

public Connection getConnection()
                         throws SQLException

Attempt to establish a database connection.

Specified by:
getConnection in interface DataSource
Returns:
a Connection to the database
Throws:
SQLException - if a database-access error occurs.

getConnection

public Connection getConnection(String _user,
                                String _passwd)
                         throws SQLException

Attempt to establish a database connection.

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

getPhysicalConnection

protected Connection getPhysicalConnection(Properties prop)
                                    throws SQLException
Throws:
SQLException

getConnection

public Connection getConnection(Properties cachedConnectionAttributes)
                         throws SQLException
Deprecated. Use Oracle Universal Connection Pool instead.

Attempt to obtain a database connection from the Implicit Connection Cache using Connection Attributes

Returns:
logical Connection
Throws:
SQLException - if a database-access error occurs.

getConnection

public Connection getConnection(String _user,
                                String _passwd,
                                Properties cachedConnectionAttributes)
                         throws SQLException
Deprecated. Use Oracle Universal Connection Pool instead.

Attempt to obtain a database connection from the Implicit Connection Cache using user, passwd and Connection Attributes

Returns:
logical Connection
Throws:
SQLException - if a database-access error occurs.

close

public void close()
           throws SQLException
Deprecated. Use Oracle Universal Connection Pool instead.

Close DataSource API. This removes the associated Connection Cache and frees resources. This must be the last method to invoke, after the user is finished using a cache enabled DataSource.

Throws:
SQLException

setConnectionCachingEnabled

public void setConnectionCachingEnabled(boolean flag)
                                 throws SQLException
Deprecated. Use Oracle Universal Connection Pool instead.

Setter method to enable Implicit Connection Caching

Parameters:
flag - boolean value
Throws:
SQLException

getConnectionCachingEnabled

public boolean getConnectionCachingEnabled()
                                    throws SQLException
Throws:
SQLException

setConnectionCacheName

public void setConnectionCacheName(String cacheName)
                            throws SQLException
Throws:
SQLException

getConnectionCacheName

public String getConnectionCacheName()
                              throws SQLException
Throws:
SQLException

setConnectionCacheProperties

public void setConnectionCacheProperties(Properties cp)
                                  throws SQLException
Deprecated. Use Oracle Universal Connection Pool instead.

Setter method to set one or more Implicit Connection Cache properties. If a null value is set, default values will take effect. Below are the list of properties supported. These are the keys (case sensitive) to be used when setting their appropriate values.

Parameters:
cp - key/value pairs. Description of the supported keys follow.
  • MinLimit

    Sets limit on Minimum number of connections. Defaults to 0.

  • MaxLimit

    Sets limit on Maximum number of connections. No default.

  • InitialLimit

    Sets limit on the number of initial connections populated, when the cache is first created. Defaults to 0.

  • MaxStatementsLimit

    Sets the Maximum number of statements that each connection keeps open, for statement caching. Defaults to 0.

  • InactivityTimeout

    Sets the Maximum time, in seconds, a connection in the cache can remain idle (that is not checked out of the cache). Defaults to 0.

  • TimeToLiveTimeout

    Sets that maximum time, in seconds, a checked out connection can remain idle. Defaults to 0.

  • AbandonedConnectionTimeout

    Sets the maximum time a checked out connection can remain unused (no SQL activity) before the connection is closed and returned to the cache. Defaults to 0.

  • ConnectionWaitTimeout

    Specifies the time limit to wait, when a new connection request arrives, and there are no connections to check out. Defaults to 0.

  • PropertyCheckInterval

    Sets the time interval for the cache daemon thread to enforce the time out limits. Defaults to 900 seconds (15 minutes).

  • ValidateConnection

    Verifies each connection for validity, before a checked out connection is returned to the caller. Defaults to false.

  • ClosestConnectionMatch

    Causes the connection cache to retrieve the connection with the closest approximation to the specified connection attributes. Defaults to false.

  • AttributeWeights

    Sets the weight (integer) for each connection attribute. This is used when ClosestConnectionMatch is set to true, and enables retrieval of a connection with the highest combined weight of all its connection attributes. Defaults to a weight of 1.

  • LowerThresholdLimit

    Sets the lower threshold limit on the cache. This is used for the releaseConnection() cache callback method is registered. Defaults to 20%.

Throws:
SQLException

getConnectionCacheProperties

public Properties getConnectionCacheProperties()
                                        throws SQLException
Throws:
SQLException

setFastConnectionFailoverEnabled

public void setFastConnectionFailoverEnabled(boolean flag)
                                      throws SQLException
Throws:
SQLException

getFastConnectionFailoverEnabled

public boolean getFastConnectionFailoverEnabled()
                                         throws SQLException
Throws:
SQLException

getONSConfiguration

public String getONSConfiguration()
                           throws SQLException
Deprecated. Use Oracle Universal Connection Pool instead.

Return the ONS configuration string that is used for remote ONS subscription, in the form specified in setONSConfiguration(String). This is used by Fast Connection Failover and Runtime Load Balancing.

Returns:
The ONS configuration string used for remote ONS subscription.
Throws:
SQLException

setONSConfiguration

public void setONSConfiguration(String onsConfigStr)
                         throws SQLException
Deprecated. Use Oracle Universal Connection Pool instead.

Set the configuration string used for remote ONS subscription. The parameter string closely resembles the content of the ONS configuration file "ons.config", and contains a list of "<name>=<value>" pairs separated by newline character '\n', where <name> can be one of "nodes", "walletfile", or "walletpassword". The parameter string should at least specify the ONS configuration attribute "nodes", as a list of host:port pairs separated by comma ','. SSL would be used when the "walletfile" attribute is specified as an Oracle wallet file.

An example ONS configuration string:

      "nodes=host1:4200,host2:4200\nwalletfile=wfile\nwalletpassword=wpwd"
    

This is used primarily by Fast Connection Failover and Runtime Load Balancing.

Parameters:
onsConfigStr - The configuration string for remote ONS subscription
Throws:
SQLException

getLoginTimeout

public int getLoginTimeout()
Gets the maximum time in seconds that this data source can wait while attempting to connect to a database. A value of zero means that the timeout is the default system timeout if there is one; otherwise it means that there is no timeout. When a DataSource object is created the login timeout is initially zero.
Specified by:
getLoginTimeout in interface CommonDataSource
Returns:
the data source login time limit
Throws:
SQLException - if a database access error occurs.

setLoginTimeout

public void setLoginTimeout(int timeout)

Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. A value of zero specifies that the timeout is the default system timeout if there is one; otherwise it specifies that there is no timeout. When a DataSource object is created the login timeout is initially zero.

Specified by:
setLoginTimeout in interface CommonDataSource
Parameters:
seconds - the data source login time limit
Throws:
SQLException - if a database access error occurs.

setLogWriter

public void setLogWriter(PrintWriter pw)

Set the log writer for this data source.

The log writer is a character output stream to which all logging and tracing messages for this data source object instance will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.Drivermanager class. When a DataSource object is created the log writer is initially null, in other words, logging is disabled.

Specified by:
setLogWriter in interface CommonDataSource
Parameters:
out - the new log writer; to disable, set to null
Throws:
SQLException - if a database-access error occurs.

getLogWriter

public PrintWriter getLogWriter()

Get the log writer for this data source.

The log writer is a character output stream to which all logging and tracing messages for this data source object instance will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.Drivermanager class. When a DataSource object is created the log writer is initially null, in other words, logging is disabled.

Specified by:
getLogWriter in interface CommonDataSource
Returns:
the log writer for this data source, null if disabled
Throws:
SQLException - if a database-access error occurs.

setTNSEntryName

public void setTNSEntryName(String dbname)
Set the TNS entry name. Works only for JDBC OCI driver. Assumed that client side Oracle in installed and TNS_ADMIN env variable is set. If URL is set, this property will be ignored.
Parameters:
dbname - tns entry name

getTNSEntryName

public String getTNSEntryName()
Get the TNS entry name for this instance if set. Returns null if not set.
Returns:
TNS entry name

setDataSourceName

public void setDataSourceName(String dsname)
Set the DataSourceName. Users need not set this as it will be set set automatically depending upon the instance created. Returns OracleDataSource for an OracleDataSource instance. Returns OracleXADataSource for an OracleXADataSource instance.
Parameters:
dsname - DataSource Name to be set.

getDataSourceName

public String getDataSourceName()
Get the datasource name for this instance if set. Returns null if not set.
Returns:
DaraSource name

getDatabaseName

public String getDatabaseName()
Get the name of the database set on this DataSource instance.
Returns:
database name set on this instance or null if not set.

setDatabaseName

public void setDatabaseName(String dbname)
Set the name of a particular database on a server. In Oracle's jargon this is called SID (System Identifier).

If URL is set, this property will be ignored.

Parameters:
dsname - database name to be set.

setServiceName

public void setServiceName(String svcname)
Set the service_name of a database on a server. If URL is set, this property will be ignored. To distinguish services from instances, a new URL using service_name is added, existing url with SID will be supported, but deprecated.
Parameters:
svcname - service_name to be set.

getServiceName

public String getServiceName()
Get the service_name To distinguish services from instances, a new URL using service_name is added, existing url with SID will be supported, but deprecated.
Returns:
service_name assiciated with the instance or null if not set.

setServerName

public void setServerName(String sn)
Set the name of the Server on which database is running. If URL is set, this property will be ignored.
Parameters:
sn - server/host name to be set.

getServerName

public String getServerName()
Get the name of the server on which database is running.
Returns:
server name set on this instance or null if not set.

setURL

public void setURL(String url)
Set the URL from which connections have to be obtained. If URL is set all other properties like databasename, servername, portNumber, network protocol, tnsentry, and driver Type will be ignored.
Parameters:
url - URL to be set.

getURL

public String getURL()
              throws SQLException
Get the URL for this datasource. Will return the default value "jdbc:oracle:oci8:@" if not set before.
Throws:
SQLException

setUser

public void setUser(String userName)
Set the user name with which connections have to be obtained.
Parameters:
user - Username to be set.

getUser

public String getUser()
Get the user name for this datasource. Will return the default value ("scott") if not set before.

setPassword

public void setPassword(String pd)
Set the password with which connections have to be obtained. The default value is "tiger".
Parameters:
pd - Passowrd to be set.

getPassword

protected String getPassword()

getDescription

public String getDescription()
Get the Desciption of this data source.
Returns:
Description that was set or will return null if not set.

setDescription

public void setDescription(String des)
Set the Desciption for this data source instance.
Parameters:
des - Desciption to be set.

getDriverType

public String getDriverType()
Get the Oracle JDBC driver type set for this datasource instance
Returns:
Driver Type that was set or null if not set.

setDriverType

public void setDriverType(String dt)
Set the JDBC driver type. Possible values are thin, oci8, and kprb. If URL is set, this property will be ignored.

If set to kprb, nothing else is needed to open a connection. This is meant for Server side JDBC driver when running inside server.

If set to thin, serverName, portNumber and databaseName are need to open a connection.

If set to oci, and network protocol is set to IPC or TNSEntryName is set then nothing else is needed. If not, serverName, portNumber and databaseName have to be provided.

Parameters:
dt - Driver Type tp be set.

getNetworkProtocol

public String getNetworkProtocol()
Get the network protocol set.
Returns:
network protocol that was set or null if not.

setNetworkProtocol

public void setNetworkProtocol(String np)
Set the network protocol for the connections. Default is "tcp". Can be set to all possible protocols Net8 supports. Only needed for JDBC OCI driver.
Parameters:
np - set the network protocol to be used.

setPortNumber

public void setPortNumber(int pn)
Set the port number where a server is listening for requests. Not required when URL is set.
Parameters:
pn - port number on which server is listening

getPortNumber

public int getPortNumber()
Get the port number on which server is listening for requests.
Returns:
port number if set or null if not set.

getReference

public Reference getReference()
                       throws NamingException
Specified by:
getReference in interface Referenceable
Throws:
NamingException

addRefProperties

protected void addRefProperties(Reference ref)

trace

protected void trace(String s)

copy

protected void copy(OracleDataSource ds)
             throws SQLException
Throws:
SQLException

setMaxStatements

public void setMaxStatements(int max)
                      throws SQLException
Deprecated. 
setMaxStatements Specifies the value of the maxStatements property. This will be the size of the application cache (which will be used by both implicit and explicit caching). This value does not apply to the statement cache size of connections created by ImplicitStatementCache for which the cache size is set through java.util.Properties object.
Parameters:
max - Requested size of the cache. If the existing cache size is less than max, statements will be purged to reduce the size.
Throws:
SQLException - if max < 0

getMaxStatements

public int getMaxStatements()
                     throws SQLException
getMaxStatements Returns the current value of the maxStatements property.
Throws:
SQLException

setImplicitCachingEnabled

public void setImplicitCachingEnabled(boolean cache)
                               throws SQLException
setImplicitCachingEnabled Sets the value of the implicitCachingEnabled property, which enables or disables the implicit cache. Note that this is independent of the cache size, set with setMaxStatements().
Parameters:
cache - If true, then implicit caching will be enabled. If false, then any existing statements will be purged and the implicit cache will be disabled.
Throws:
SQLException

getImplicitCachingEnabled

public boolean getImplicitCachingEnabled()
                                  throws SQLException
getImplicitCachingEnabled Returns the current value of the implicitCachingEnabled property.
Throws:
SQLException

setExplicitCachingEnabled

public void setExplicitCachingEnabled(boolean cache)
                               throws SQLException
setExplicitCachingEnabled Sets the value of the explicitCachingEnabled property, which enables or disables the explicit cache. Note that this is independent of the cache size, set with setMaxStatements().
Parameters:
cache - If true, then explicit caching will be enabled. If false, then any existing statements will be purged and the explicit cache will be disabled.
Throws:
SQLException - if called on a logical connection.

getExplicitCachingEnabled

public boolean getExplicitCachingEnabled()
                                  throws SQLException
getExplicitCachingEnabled Returns the current value of the explicitCachingEnabled property.
Throws:
SQLException

setConnectionProperties

public void setConnectionProperties(Properties value)
                             throws SQLException
Sets the Connection Properties for the datasource

The argument to this method is a Properties object. This properties object is used to create the connections returned by the receiver. The keys and values are Strings. The keys, values, and their meanings are defined in oracle.jdbc.OracleConnection.

Parameters:
value - a Properties object with the desired connection property names and values.
Throws:
SQLException
See Also:
OracleConnection

getConnectionProperties

public Properties getConnectionProperties()
                                   throws SQLException
getConnectionProperties Returns the current Properties set in the datasource.
Throws:
SQLException

isWrapperFor

public boolean isWrapperFor(Class<?> iface)
                     throws SQLException
Since this class is not a wrapper, just check to see if this implements the requested interface.
Specified by:
isWrapperFor in interface Wrapper
Parameters:
iface - requested interface
Returns:
true iff this implements the requested interface
Throws:
SQLException - if the arg is not an interface
Since:
JDBC 4.0

unwrap

public <T> T unwrap(Class<T> iface)
         throws SQLException
Since this class is not a wrapper, just check to see if this implements the requested interface. If it does return this.
Specified by:
unwrap in interface Wrapper
Parameters:
iface - requested interface
Returns:
this iff this implements the requested interface
Throws:
SQLException - if this does not implement the arg or the arg is not an interface
Since:
JDBC 4.0

getParentLogger

public Logger getParentLogger()
                       throws SQLFeatureNotSupportedException
Throws:
SQLFeatureNotSupportedException

getConnectionDuringExceptionHandling

protected oracle.jdbc.internal.OracleConnection getConnectionDuringExceptionHandling()

Skip navigation links

Oracle®Database JDBC Java API Reference
12c Release 1 (12.1.0.2)
E56669-01


Copyright © 2008, 2014, Oracle and/or its affiliates. All rights reserved.