Oracle JDBC API Reference
11g Release 2 ("11.2.0.3.0")

oracle.jdbc.pool
Class OracleDataSource

java.lang.Object
  extended by oracle.jdbc.pool.OracleDataSource
All Implemented Interfaces:
java.io.Serializable, javax.naming.Referenceable, javax.sql.DataSource
Direct Known Subclasses:
OracleConnectionPoolDataSource, OracleOCIConnectionPool

public class OracleDataSource
extends java.lang.Object
implements javax.sql.DataSource, java.io.Serializable, javax.naming.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
static java.lang.String BUILD_DATE
           
 boolean isOracleDataSource
           
static boolean TRACE
           
 
Constructor Summary
OracleDataSource()
           
 
Method Summary
 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.

 java.sql.Connection getConnection()
          Attempt to establish a database connection.
 java.sql.Connection getConnection(java.util.Properties cachedConnectionAttributes)
          Deprecated. Use Oracle Universal Connection Pool instead.

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

 java.sql.Connection getConnection(java.lang.String _user, java.lang.String _passwd)
          Attempt to establish a database connection.
 java.sql.Connection getConnection(java.lang.String _user, java.lang.String _passwd, java.util.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

 java.lang.String getConnectionCacheName()
           
 java.util.Properties getConnectionCacheProperties()
           
 boolean getConnectionCachingEnabled()
           
 java.util.Properties getConnectionProperties()
          getConnectionProperties Returns the current Properties set in the datasource.
 java.lang.String getDatabaseName()
          Get the name of the database set on this DataSource instance.
 java.lang.String getDataSourceName()
          Get the datasource name for this instance if set.
 java.lang.String getDescription()
          Get the Desciption of this data source.
 java.lang.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.
 java.io.PrintWriter getLogWriter()
          Get the log writer for this data source.
 int getMaxStatements()
          getMaxStatements Returns the current value of the maxStatements property.
 java.lang.String getNetworkProtocol()
          Get the network protocol set.
 java.lang.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.

 int getPortNumber()
          Get the port number on which server is listening for requests.
 javax.naming.Reference getReference()
           
 java.lang.String getServerName()
          Get the name of the server on which database is running.
 java.lang.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.
 java.lang.String getTNSEntryName()
          Get the TNS entry name for this instance if set.
 java.lang.String getURL()
          Get the URL for this datasource.
 java.lang.String getUser()
          Get the user name for this datasource.
 void setConnectionCacheName(java.lang.String cacheName)
           
 void setConnectionCacheProperties(java.util.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(java.util.Properties value)
          Sets the Connection Properties for the datasource
 void setDatabaseName(java.lang.String dbname)
          Set the name of a particular database on a server.
 void setDataSourceName(java.lang.String dsname)
          Set the DataSourceName.
 void setDescription(java.lang.String des)
          Set the Desciption for this data source instance.
 void setDriverType(java.lang.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(java.io.PrintWriter pw)
          Set the log writer for this data source.
 void setMaxStatements(int max)
          Deprecated.  
 void setNetworkProtocol(java.lang.String np)
          Set the network protocol for the connections.
 void setONSConfiguration(java.lang.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 "=" pairs separated by newline character '\n', where 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(java.lang.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(java.lang.String sn)
          Set the name of the Server on which database is running.
 void setServiceName(java.lang.String svcname)
          Set the service_name of a database on a server.
 void setTNSEntryName(java.lang.String dbname)
          Set the TNS entry name.
 void setURL(java.lang.String url)
          Set the URL from which connections have to be obtained.
 void setUser(java.lang.String userName)
          Set the user name with which connections have to be obtained.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isOracleDataSource

public boolean isOracleDataSource

BUILD_DATE

public static final java.lang.String BUILD_DATE
See Also:
Constant Field Values

TRACE

public static final boolean TRACE
See Also:
Constant Field Values
Constructor Detail

OracleDataSource

public OracleDataSource()
                 throws java.sql.SQLException
Throws:
java.sql.SQLException
Method Detail

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException

Attempt to establish a database connection.

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

getConnection

public java.sql.Connection getConnection(java.lang.String _user,
                                         java.lang.String _passwd)
                                  throws java.sql.SQLException

Attempt to establish a database connection.

Specified by:
getConnection in interface javax.sql.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:
java.sql.SQLException - if a database-access error occurs.

getConnection

public java.sql.Connection getConnection(java.util.Properties cachedConnectionAttributes)
                                  throws java.sql.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:
java.sql.SQLException - if a database-access error occurs.

getConnection

public java.sql.Connection getConnection(java.lang.String _user,
                                         java.lang.String _passwd,
                                         java.util.Properties cachedConnectionAttributes)
                                  throws java.sql.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:
java.sql.SQLException - if a database-access error occurs.

close

public void close()
           throws java.sql.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:
java.sql.SQLException

setConnectionCachingEnabled

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

Setter method to enable Implicit Connection Caching

Parameters:
flag - boolean value
Throws:
java.sql.SQLException

getConnectionCachingEnabled

public boolean getConnectionCachingEnabled()
                                    throws java.sql.SQLException
Throws:
java.sql.SQLException

setConnectionCacheName

public void setConnectionCacheName(java.lang.String cacheName)
                            throws java.sql.SQLException
Throws:
java.sql.SQLException

getConnectionCacheName

public java.lang.String getConnectionCacheName()
                                        throws java.sql.SQLException
Throws:
java.sql.SQLException

setConnectionCacheProperties

public void setConnectionCacheProperties(java.util.Properties cp)
                                  throws java.sql.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:
java.sql.SQLException

getConnectionCacheProperties

public java.util.Properties getConnectionCacheProperties()
                                                  throws java.sql.SQLException
Throws:
java.sql.SQLException

setFastConnectionFailoverEnabled

public void setFastConnectionFailoverEnabled(boolean flag)
                                      throws java.sql.SQLException
Throws:
java.sql.SQLException

getFastConnectionFailoverEnabled

public boolean getFastConnectionFailoverEnabled()
                                         throws java.sql.SQLException
Throws:
java.sql.SQLException

getONSConfiguration

public java.lang.String getONSConfiguration()
                                     throws java.sql.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:
java.sql.SQLException

setONSConfiguration

public void setONSConfiguration(java.lang.String onsConfigStr)
                         throws java.sql.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 "=" pairs separated by newline character '\n', where 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:
java.sql.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 javax.sql.DataSource
Returns:
the data source login time limit
Throws:
java.sql.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 javax.sql.DataSource
Parameters:
seconds - the data source login time limit
Throws:
java.sql.SQLException - if a database access error occurs.

setLogWriter

public void setLogWriter(java.io.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 javax.sql.DataSource
Parameters:
out - the new log writer; to disable, set to null
Throws:
java.sql.SQLException - if a database-access error occurs.

getLogWriter

public java.io.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 javax.sql.DataSource
Returns:
the log writer for this data source, null if disabled
Throws:
java.sql.SQLException - if a database-access error occurs.

setTNSEntryName

public void setTNSEntryName(java.lang.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 java.lang.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(java.lang.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 java.lang.String getDataSourceName()
Get the datasource name for this instance if set. Returns null if not set.

Returns:
DaraSource name

getDatabaseName

public java.lang.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(java.lang.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(java.lang.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 java.lang.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(java.lang.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 java.lang.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(java.lang.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 java.lang.String getURL()
                        throws java.sql.SQLException
Get the URL for this datasource. Will return the default value "jdbc:oracle:oci8:@" if not set before.

Throws:
java.sql.SQLException

setUser

public void setUser(java.lang.String userName)
Set the user name with which connections have to be obtained.

Parameters:
user - Username to be set.

getUser

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


setPassword

public void setPassword(java.lang.String pd)
Set the password with which connections have to be obtained. The default value is "tiger".

Parameters:
pd - Passowrd to be set.

getDescription

public java.lang.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(java.lang.String des)
Set the Desciption for this data source instance.

Parameters:
des - Desciption to be set.

getDriverType

public java.lang.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(java.lang.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 java.lang.String getNetworkProtocol()
Get the network protocol set.

Returns:
network protocol that was set or null if not.

setNetworkProtocol

public void setNetworkProtocol(java.lang.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 javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
Specified by:
getReference in interface javax.naming.Referenceable
Throws:
javax.naming.NamingException

setMaxStatements

public void setMaxStatements(int max)
                      throws java.sql.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:
java.sql.SQLException - if max < 0

getMaxStatements

public int getMaxStatements()
                     throws java.sql.SQLException
getMaxStatements Returns the current value of the maxStatements property.

Throws:
java.sql.SQLException

setImplicitCachingEnabled

public void setImplicitCachingEnabled(boolean cache)
                               throws java.sql.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:
java.sql.SQLException

getImplicitCachingEnabled

public boolean getImplicitCachingEnabled()
                                  throws java.sql.SQLException
getImplicitCachingEnabled Returns the current value of the implicitCachingEnabled property.

Throws:
java.sql.SQLException

setExplicitCachingEnabled

public void setExplicitCachingEnabled(boolean cache)
                               throws java.sql.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:
java.sql.SQLException - if called on a logical connection.

getExplicitCachingEnabled

public boolean getExplicitCachingEnabled()
                                  throws java.sql.SQLException
getExplicitCachingEnabled Returns the current value of the explicitCachingEnabled property.

Throws:
java.sql.SQLException

setConnectionProperties

public void setConnectionProperties(java.util.Properties value)
                             throws java.sql.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, values, and their meanings are given in the following table. The values are all Strings.The table indicates how the String values are interpreted.

Key Value Comment
user String The value of this property is used as the user name when connecting to the database.
password String The value of this property is used as the password when connecting to the database.
database String The value of this property is used as the SID of the database.
server String The value of this property is used as the host name of the database.
internal_logon String The value of this property is used as the user name when performing an internal logon. Usually this will be SYS or SYSDBA.
defaultRowPrefetch int The value of this property is used as the default number of rows to prefetch.
defaultExecuteBatch int The value of this property is used as the default batch size when using Oracle style batching.
processEscapes boolean If the value of this property is "false" then the default setting for Statement.setEscapeProccessing is false.
disableDefineColumnType boolean When this connection property has the value true, the method defineColumnType is has no effect. This is highly recommended when using the Thin driver, especially when the database character set contains four byte characters that expand to two UCS2 surrogate characters, e.g. AL32UTF8. The method defineColumnType provides no performance benefit (or any other benefit) when used with the 10g Thin driver. This property is provided so that you do not have to remove the calls from your code. This is especially valuable if you use the same code with Thin driver and either the OCI or Server Internal driver.
DMSName String Set the name of the DMS Noun that is the parent of all JDBC DMS metrics.
DMSType String Set the type of the DMS Noun that is the parent of all JDBC DMS metrics.
AccumulateBatchResult boolean When using Oracle style batching, JDBC determines when to flush a batch to the database. If this property is true, then the number of modified rows accumulated across all batches flushed from a single statement. The default is to count each batch separately.
oracle.jdbc.J2EE13Compliant boolean If the value of this property is "true", JDBC uses strict compliance for some edge cases. In general Oracle's JDBC drivers will allow some operations that are not permitted in the strict interpretation of J2EE 1.3. Setting this property to true will cause those cases to throw SQLExceptions. There are some other edge cases where Oracle's JDBC drivers have slightly different behavior than defined in J2EE 1.3. This results from Oracle having defined the behavior prior to the J2EE 1.3 specification and the resultant need for compatibility with existing customer code. Setting this property will result in full J2EE 1.3 compliance at the cost of incompatibility with some customer code. Can be either a system property or a connection property.
oracle.jdbc.TcpNoDelay boolean If the value of this property is "true", the TCP_NODELAY property is set on the socket when using the Thin driver. See java.net.SocketOptions.TCP_NODELAY. Can be either a system property or a connection property.
defaultNChar boolean If the value of this property is "true", the default mode for all character data columns will be NCHAR.
useFetchSizeWithLongColumn boolean If the value of this property is "true", then JDBC will prefetch rows even though there is a LONG or LONG RAW column in the result. By default JDBC fetches only one row at a time if there are LONG or LONG RAW columns in the result. Setting this property to true can improve performance but can also cause SQLExceptions if the results are too big.
remarksReporting boolean If the value of this property is "true", OracleDatabaseMetaData will include remarks in the meta data. This can result in a substantial reduction in performance.
includeSynonyms boolean If the value of this property is "true", JDBC will include synonyms when getting information about a column.
restrictGetTables boolean If the value of this property is "true", JDBC will return a more refined value for DatabaseMeta.getTables. By default JDBC will return things that are not accessible tables. These can be non-table objects or accessible synonymns for inaccessible tables. If this property is true JDBC will return only accessible tables. This has a substantial performance penalty.
fixedString boolean If the value of this property is "true", JDBC will use FIXED CHAR semantic when setObject is called with a String argument. By default JDBC uses VARCHAR semantics. The difference is in blank padding. With the default there is no blank padding so, for example, 'a' does not equal 'a ' in a CHAR(4). If true these two will be equal.
oracle.jdbc.ocinativelibrary String Set the name of the native library for the oci driver. If not set, the default name, libocijdbcX (X is a version number), is used.
oracle.jdbc.StreamBufferSize int Set size of the buffer for the InputStream/Reader obtained from getXXXStream/getXXXReader. The default size is 16k. The size passed should be at least 4096 or else 4096 is assumed.
OCINewPassword String Pass the value of new password to be set during logon. This could be typically used for resetting the password when the password has expired or when the account is in the grace period.
oracle.jdbc.RetainV9BehaviorForLongBind boolean This is applicable only for the thin driver.
Pass true to retain the V9 bind behavior for Long and potential long binds.
false is the default behavior which would emulate the same behavior as in OCI driver.
oracle.jdbc.FreeMemoryOnEnterImplicitCache boolean Clear the define buffers before caching the statement when Implicit statement caching is enabled.
Setting the value to true would enable the clearing of define buffers before caching of Statements in the Statement cache. false is the default value and this would behave in the same way as statement caching worked in prior releases.
oracle.jdbc.ReadTimeout int read timeout while reading from the socket. This affects thin driver only. Timeout is in milliseconds.

Throws:
java.sql.SQLException

getConnectionProperties

public java.util.Properties getConnectionProperties()
                                             throws java.sql.SQLException
getConnectionProperties Returns the current Properties set in the datasource.

Throws:
java.sql.SQLException

Oracle JDBC API Reference
11g Release 2 ("11.2.0.3.0")

Copyright © 1998, 2007, Oracle. All rights reserved.