Oracle Fusion Middleware Java API Reference for Oracle TopLink (Deprecated)
11g Release 1 (11.1.1)

B32476-04

oracle.toplink.sessions
Class DatabaseLogin

java.lang.Object
  extended by oracle.toplink.sessions.DatasourceLogin
      extended by oracle.toplink.sessions.DatabaseLogin
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Login

public class DatabaseLogin
extends DatasourceLogin

Purpose: Hold the configuration information necessary to connect to a JDBC driver.

Description: A DatabaseLogin is used by a TopLink database session to connect to a JDBC server.

Responsibilities:

See Also:
Serialized Form

Field Summary
static int TRANSACTION_NONE
          Transactions are not supported.
static int TRANSACTION_READ_COMMITTED
          Dirty reads are prevented; non-repeatable reads and phantom reads can occur.
static int TRANSACTION_READ_UNCOMMITTED
          Dirty reads, non-repeatable reads and phantom reads can occur.
static int TRANSACTION_REPEATABLE_READ
          Dirty reads and non-repeatable reads are prevented; phantom reads can occur.
static int TRANSACTION_SERIALIZABLE
          Dirty reads, non-repeatable reads and phantom reads are prevented.
static java.lang.String[] xmlParserJARFileNames
          The names of the TopLink SDK XML Support JAR files
 
Fields inherited from class oracle.toplink.sessions.DatasourceLogin
CONCURRENT_READ_WRITE, SYNCHRONIZED_READ_ON_WRITE, SYNCHRONIZED_WRITE, SYNCRONIZED_OBJECT_LEVEL_READ_WRITE, SYNCRONIZED_OBJECT_LEVEL_READ_WRITE_DATABASE, versionString
 
Constructor Summary
DatabaseLogin()
          Create a new login.
DatabaseLogin(DatabasePlatform databasePlatform)
          ADVANCED: Create a new login for the given platform.
 
Method Summary
 void addStructConverter(StructConverter converter)
          ADVANCED: Add a StructConverter
 void bindAllParameters()
          Bind all arguments to any SQL statement.
 void cacheAllStatements()
          Cache all prepared statements, this requires full parameter binding as well.
 void dontBindAllParameters()
          Do not bind all arguments to any SQL statement.
 void dontCacheAllStatements()
          Do not cache all prepared statements.
 void dontOptimizeDataConversion()
          Disable driver level data conversion optimization.
 void dontUseBatchWriting()
          TopLink can be configured to use batch writing.
 void dontUseByteArrayBinding()
          TopLink can be configured to use parameter binding for large binary data.
 void dontUseJDBCBatchWriting()
          Indicate to TopLink that the JDBC driver does not support batch writing.
 void dontUseNativeSequencing()
          Deprecated. use setDefaultSequence(Sequence) instead, sequence could be: sequence = new TableSequence(); sequence = new UnaryTableSequence(); ....
 void dontUseNativeSQL()
          TopLink can be configured to use database-specific SQL grammar, as opposed to the JDBC standard grammar.
 void dontUseStreamsForBinding()
          TopLink can be configured to use streams to store large binary data.
 void dontUseStringBinding()
          Do not bind strings of any size.
 java.lang.String getConnectionString()
          Return the JDBC connection string.
 int getCursorCode()
          ADVANCED: Return the code for preparing cursored output parameters in a stored procedure
 java.lang.String getDatabaseName()
          The database name is required when connecting to databases that support multiple databases within a single server instance (e.g.
 java.lang.String getDatabaseURL()
          The database URL is the JDBC URL for the database server.
 java.lang.String getDataSourceName()
          The data source name is required if connecting through ODBC (JDBC-ODBC, etc.).
 int getDelayBetweenConnectionAttempts()
          Returns the number of milliseconds that TopLink will wait between attempts to reconnect a DatabaseConnection in the case TopLink is attempting to retry a query, the default is 5000.
 java.lang.String getDriverClassName()
          The driver class is the name of the Java class for the JDBC driver being used (e.g.
 java.lang.String getDriverURLHeader()
          The driver URL header is the string predetermined by the JDBC driver to be part of the URL connection string, (e.g.
 int getMaxBatchWritingSize()
          Allow for the max batch writing size to be set.
 java.lang.String getPingSQL()
          TopLink will attempt to test a connection if it encounters an exception on the connection when executing SQL.
 java.lang.String getQualifiedSequenceTableName()
          Deprecated. use ((TableSequence)getDefaultSequence()).getQualifiedTableName() instead
 int getQueryRetryAttemptCount()
          Return the number of attempts TopLink should make to re-connect to a database and re-execute a query after a query has failed because of a communication issue.
 java.lang.String getSequenceCounterFieldName()
          Deprecated. use ((TableSequence)getDefaultSequence()).getCounterFieldName() instead
 java.lang.String getSequenceNameFieldName()
          Deprecated. use ((TableSequence)getDefaultSequence()).getNameFieldName() instead
 java.lang.String getSequenceTableName()
          Deprecated. use ((TableSequence)getDefaultSequence()).getTableName() instead
 java.lang.String getServerName()
          The server name is the name of the database instance.
 boolean getShouldBindAllParameters()
          Used to help bean introspection.
 boolean getShouldCacheAllStatements()
          Used to help bean introspection.
 boolean getShouldOptimizeDataConversion()
          Used to help bean introspection.
 boolean getShouldTrimStrings()
          Used to help bean introspection.
 int getStatementCacheSize()
          If prepared statement caching is used, return the cache size.
 int getStringBindingSize()
          Used to help bean introspection.
 int getTransactionIsolation()
          Return the transaction isolation setting for the connection.
 boolean getUsesBinding()
          Used to help bean introspection.
 boolean getUsesNativeSequencing()
          Used to help bean introspection.
 boolean getUsesNativeSQL()
          Used to help bean introspection.
 boolean getUsesStreamsForBinding()
          Used to help bean introspection.
 boolean getUsesStringBinding()
          Used to help bean introspection.
static java.lang.String[] getXMLParserJARFileNames()
          ADVANCED: Return the names of the TopLink SDK XML Support JAR files
 void handleTransactionsManuallyForSybaseJConnect()
          Force TopLink to manually begin transactions instead of using autoCommit.
 boolean isAnyOracleJDBCDriver()
          Return whether an Oracle JDBC driver is being used.
 boolean isCloudscapeJDBCDriver()
          Return whether a Cloudscape JDBC driver is being used.
 boolean isConnectionHealthValidatedOnError()
          This value defaults to true if 'ping SQL' is available on the platform.
 boolean isDB2JDBCDriver()
          Return whether an IBM DB2 native client JDBC driver is being used.
 boolean isIntersolvSequeLinkDriver()
          Return whether an Intersolv SeqeLink JDBC driver is being used.
 boolean isJConnectDriver()
          Return whether a Sybase JConnect JDBC driver is being used.
 boolean isJDBCConnectDriver()
          Return whether a Borland JDBCConnect JDBC driver is being used.
 boolean isJDBCConnectRemoteDriver()
          Return whether a Borland JDBCConnect JDBC driver is being used.
 boolean isJDBCODBCBridge()
          Return whether a Sun/Merant JDBC-ODBC bridge driver is being used.
 boolean isOracle7JDBCDriver()
          Return whether an Oracle native 7.x OCI JDBC driver is being used.
 boolean isOracleJDBCDriver()
          Return whether an Oracle 8.x native OCI JDBC driver is being used.
 boolean isOracleServerJDBCDriver()
          Return whether an Oracle thin JDBC driver is being used.
 boolean isOracleThinJDBCDriver()
          Return whether an Oracle thin JDBC driver is being used.
 boolean isWebLogicOracleOCIDriver()
          Return whether a WebLogic Oracle OCI JDBC driver is being used.
 boolean isWebLogicSQLServerDBLibDriver()
          Return whether a WebLogic SQL Server dblib JDBC driver is being used.
 boolean isWebLogicSQLServerDriver()
          Return whether a WebLogic SQL Server JDBC driver is being used.
 boolean isWebLogicSybaseDBLibDriver()
          Return whether a WebLogic Sybase dblib JDBC driver is being used.
 boolean isWebLogicThinClientDriver()
          Return whether a WebLogic thin client JDBC driver is being used.
 boolean isWebLogicThinDriver()
          Return whether a WebLogic thin JDBC driver is being used.
 void optimizeDataConversion()
          Enable driver level data conversion optimization.
 void setConnectionHealthValidatedOnError(boolean isConnectionHealthValidatedOnError)
          This value defaults to true and on an SQL Exception TopLink will ping the database to determine if the connection used can continue to be used for queries.
 void setConnectionString(java.lang.String url)
          Set the JDBC connection string.
 void setCursorCode(int cursorCode)
          ADVANCED: Set the code for preparing cursored output parameters in a stored procedure
 void setDatabaseName(java.lang.String databaseName)
          The database name is required when connecting to databases that support multiple databases within a single server instance (e.g.
 void setDatabaseURL(java.lang.String databaseURL)
          The database URL is the JDBC URL for the database server.
 void setDataSourceName(java.lang.String dataSourceName)
          Deprecated. since 10.1.3 replaced by setODBCDataSourceName(String)
 void setDefaultNullValue(java.lang.Class type, java.lang.Object value)
          The default value to substitute for database NULLs can be configured on a per-class basis.
 void setDelayBetweenConnectionAttempts(int delayBetweenConnectionAttempts)
          Stores the number of milliseconds that TopLink will wait between attempts to reconnect a DatabaseConnection in the case TopLink is attempting to retry a query.
 void setDriverClass(java.lang.Class driverClass)
          The driver class is the Java class for the JDBC driver to be used (e.g. sun.jdbc.odbc.JdbcOdbcDriver.class).
 void setDriverClassName(java.lang.String driverClassName)
          The name of the JDBC driver class to be used (e.g.
 void setDriverURLHeader(java.lang.String driverURLHeader)
          The driver URL header is the string predetermined by the JDBC driver to be part of the URL connection string, (e.g.
 void setMaxBatchWritingSize(int maxBatchWritingSize)
          Allow for the max batch writing size to be set.
 void setODBCDataSourceName(java.lang.String dataSourceName)
          The data source name is required if connecting through ODBC (JDBC-ODBC, etc.).
 void setPingSQL(java.lang.String pingSQL)
          TopLink will attempt to test a connection if it encounters an exception on the connection when executing SQL.
 void setQueryRetryAttemptCount(int queryRetryAttemptCount)
          Set the number of attempts TopLink should make to re-connect to a database and re-execute a query after a query has failed because of a communication issue.
 void setSequenceCounterFieldName(java.lang.String name)
          Deprecated. use ((TableSequence)getDefaultSequence()).setCounterFieldName(String) instead
 void setSequenceNameFieldName(java.lang.String name)
          Deprecated. use ((TableSequence)getDefaultSequence()).setNameFieldName(String) instead
 void setSequenceTableName(java.lang.String name)
          Deprecated. use ((TableSequence)getDefaultSequence()).setTableName(String) instead
 void setServerName(java.lang.String name)
          The server name is the name of the database instance.
 void setShouldBindAllParameters(boolean shouldBindAllParameters)
          Set whether to bind all arguments to any SQL statement.
 void setShouldCacheAllStatements(boolean shouldCacheAllStatements)
          Set whether prepared statements should be cached.
 void setShouldForceFieldNamesToUpperCase(boolean shouldForceFieldNamesToUpperCase)
          ADVANCED: This setting can be used if the application expects upper case but the database does not return consistent case (e.g. different databases).
static void setShouldIgnoreCaseOnFieldComparisons(boolean shouldIgnoreCaseOnFieldComparisons)
          ADVANCED: Allow for case in field names to be ignored as some databases are not case sensitive.
 void setShouldOptimizeDataConversion(boolean value)
          Set whether driver level data conversion optimization is enabled.
 void setShouldTrimStrings(boolean shouldTrimStrings)
          By default CHAR field values have trailing blanks trimmed, this can be configured.
 void setStatementCacheSize(int size)
          If prepared statement caching is used this configures the cache size.
 void setStringBindingSize(int stringBindingSize)
          Used to help bean introspection.
 void setTableQualifier(java.lang.String qualifier)
          Set the default qualifier for all tables.
 void setTransactionIsolation(int isolationLevel)
          Set the transaction isolation setting for the connection.
 void setUsesBatchWriting(boolean value)
          TopLink can be configured to use batch writing.
 void setUsesBinding(boolean value)
          Deprecated. replaced by setUsesByteArrayBinding(boolean)
 void setUsesByteArrayBinding(boolean value)
          TopLink can be configured to use parameter binding for large binary data.
 void setUsesJDBCBatchWriting(boolean usesJDBCBatchWriting)
          Calling this method with an argument of true indicates to TopLink that the JDBC driver supports batch writing.
 void setUsesNativeSequencing(boolean useNativeSequencing)
          Deprecated. use setDefaultSequence(Sequence) instead, sequence could be: sequence = new TableSequence(); sequence = new UnaryTableSequence(); sequence = new NativeSequence(); ...
 void setUsesNativeSQL(boolean value)
          TopLink can be configured to use database specific sql grammar not JDBC specific.
 void setUsesStreamsForBinding(boolean value)
          TopLink can be configured to use streams to store large binary data.
 void setUsesStringBinding(boolean usesStringBindingSize)
          Used to help bean introspection.
static void setXMLParserJARFileNames(java.lang.String[] jarFileNames)
          ADVANCED: Specify the names of the TopLink SDK XML Support JAR files.
 boolean shouldBindAllParameters()
          Bind all arguments to any SQL statement.
 boolean shouldCacheAllStatements()
          Cache all prepared statements, this requires full parameter binding as well.
 boolean shouldForceFieldNamesToUpperCase()
          ADVANCED: Can be used if the app expects upper case but the database is not return consistent case, i.e. different databases.
static boolean shouldIgnoreCaseOnFieldComparisons()
          ADVANCED: Allow for case in field names to be ignored as some databases are not case sensitive.
 boolean shouldOptimizeDataConversion()
          Return if our driver level data conversion optimization is enabled.
 boolean shouldTrimStrings()
          By default CHAR field values have trailing blanks trimmed, this can be configured.
 boolean shouldUseBatchWriting()
          TopLink can be configured to use batch writing.
 boolean shouldUseByteArrayBinding()
          TopLink can be configured to use parameter binding for large binary data.
 boolean shouldUseJDBCBatchWriting()
          Answers true if TopLink has JDBC batch writing enabled.
 boolean shouldUseNativeSequencing()
          TopLink can be configured to use a sequence table or native sequencing to generate unique object IDs.
 boolean shouldUseNativeSQL()
          TopLink can be configured to use database-specific SQL grammar, as opposed to the JDBC standard grammar.
 boolean shouldUseStreamsForBinding()
          TopLink can be configured to use streams to store large binary data.
 boolean shouldUseStringBinding()
          TopLink can be configured to bind large strings.
 java.lang.String toString()
          Print all of the connection information.
 void useAccess()
          Set the database platform to be Access.
 void useBatchWriting()
          TopLink can be configured to use batch writing.
 void useByteArrayBinding()
          TopLink can be configured to use parameter binding for large binary data.
 void useCloudscape()
          Set the database platform to be Cloudscape.
 void useCloudscapeDriver()
          Use the Cloudscape JDBC driver.
 void useDataSource(java.lang.String dataSource)
          Specify the J2EE DataSource name to connect to.
 void useDB2()
          Set the database platform to be DB2.
 void useDB2JDBCDriver()
          Use the IBM DB2 native client interface.
 void useDB2NetJDBCDriver()
          Use the IBM DB2 thin JDBC driver.
 void useDBase()
          Set the database platform to be DBase.
 void useDefaultDriverConnect()
          Connect to the JDBC driver via DriverManager.
 void useDefaultDriverConnect(java.lang.String driverClassName, java.lang.String driverURLHeader, java.lang.String databaseURL)
          Connect to the JDBC driver via DriverManager.
 void useDerby()
           
 void useDirectDriverConnect()
          Some JDBC drivers don't support connecting correctly (via DriverManager), but do support connecting incorrectly (e.g.
 void useDirectDriverConnect(java.lang.String driverClassName, java.lang.String driverURLHeader, java.lang.String databaseURL)
          Some JDBC drivers don't support connecting correctly (via DriverManager), but do support connecting incorrectly (e.g.
 void useExternalConnectionPooling()
          Use external connection pooling, such as WebLogic's JTS driver.
 void useExternalTransactionController()
          Use an external transaction controller such as a JTS service
 void useHSQL()
          Use the HSQL JDBC driver.
 void useHSQLDriver()
          Use the HSQL JDBC driver.
 void useINetSQLServerDriver()
          Use the i-net SQL Server JDBC driver.
 void useInformix()
          Set the database platform to be Informix.
 void useIntersolvSequeLinkDriver()
          Use the Intersolv/Merant SequeLink JDBC driver.
 void useJConnect50Driver()
          Use the Sybase JConnect JDBC driver.
 void useJConnectDriver()
          Use the Sybase JConnect JDBC driver.
 void useJDBC()
          Set the database platform to be JDBC.
 void useJDBCBatchWriting()
          TopLink support batch writing in both JDK 1.1 abd JDK 1.2.
 void useJDBCConnectDriver()
          Use the Borland JDBCConnect JDBC driver.
 void useJDBCConnectRemoteDriver()
          Use the Borland JDBCConnect JDBC driver.
 void useJDBCODBCBridge()
          User the Sun/Merant JDBC-ODBC bridge driver.
 void useJTADataSource(java.lang.String dataSource)
          Specify the J2EE JTA enabled DataSource name to connect to.
 void useMySQL()
          Set the database platform to be MySQL.
 void useNativeSequencing()
          TopLink can be configured to use a sequence table or native sequencing to generate unique object IDs.
 void useNativeSQL()
          TopLink can be configured to use database-specific SQL grammar, as opposed to the JDBC standard grammar.
 void useOracle()
          Set the database platform to be Oracle.
 void useOracle7JDBCDriver()
          Use the Oracle 7.x native OCI JDBC driver.
 void useOracleJDBCDriver()
          Use the Oracle 8.x native OCI JDBC driver.
 void useOracleServerJDBCDriver()
          Use the Oracle server JDBC driver.
 void useOracleThinJDBCDriver()
          Use the Oracle thin JDBC driver.
 void usePlatform(DatabasePlatform platform)
          ADVANCED: Set the database platform to be custom platform.
 void usePointBase()
          Set the database platform to be PointBase.
 void usePointBaseDriver()
          Use the PointBase JDBC driver.
 void useSQLServer()
          Set the database platform to be SQL Server.
 void useStreamsForBinding()
          TopLink can be configured to use streams to store large binary data.
 void useStringBinding()
          Bind strings larger than 255 characters.
 void useStringBinding(int size)
          Bind strings that are larger than the specified size.
 void useSybase()
          Set the database platform to be Sybase.
 void useWebLogicDriverCursoredOutputCode()
          Set the prepare cursor code to what the WebLogic Oracle OCI JDBC driver expects.
 void useWebLogicJDBCConnectionPool(java.lang.String poolName)
          Set a WebLogic JDBC connection pool (a pool must be defined for the entity beans that are to be deployed)
 void useWebLogicOracleOCIDriver()
          Use the WebLogic Oracle OCI JDBC driver.
 void useWebLogicSQLServerDBLibDriver()
          Use the WebLogic SQL Server dblib JDBC driver.
 void useWebLogicSQLServerDriver()
          Use the WebLogic SQL Server JDBC driver.
 void useWebLogicSybaseDBLibDriver()
          Use the WebLogic Sybase dblib JDBC driver.
 void useWebLogicThinClientDriver()
          Use the WebLogic thin client JDBC driver.
 void useWebLogicThinDriver()
          Use the WebLogic thin JDBC driver.
 
Methods inherited from class oracle.toplink.sessions.DatasourceLogin
addSequence, dontUseExternalConnectionPooling, dontUseExternalTransactionController, getCacheTransactionIsolation, getConnector, getDatasourcePlatform, getDefaultSequence, getPassword, getProperty, getSequence, getSequencePreallocationSize, getSequences, getTableQualifier, getUserName, getVersion, removeAllSequences, removeProperty, removeSequence, setCacheTransactionIsolation, setConnector, setDatasourcePlatform, setDefaultSequence, setEncryptedPassword, setEncryptionClassName, setPassword, setProperties, setProperty, setSelectSequenceNumberQuery, setSequencePreallocationSize, setTimestampQuery, setUpdateSequenceQuery, setUserName, setUsesExternalConnectionPooling, setUsesExternalTransactionController, shouldUseExternalConnectionPooling, shouldUseExternalTransactionController, usePlatform
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TRANSACTION_NONE

public static final int TRANSACTION_NONE
Description copied from class: DatabaseLogin
Transactions are not supported.

See Also:
Constant Field Values

TRANSACTION_READ_UNCOMMITTED

public static final int TRANSACTION_READ_UNCOMMITTED
Description copied from class: DatabaseLogin
Dirty reads, non-repeatable reads and phantom reads can occur.

See Also:
Constant Field Values

TRANSACTION_READ_COMMITTED

public static final int TRANSACTION_READ_COMMITTED
Description copied from class: DatabaseLogin
Dirty reads are prevented; non-repeatable reads and phantom reads can occur.

See Also:
Constant Field Values

TRANSACTION_REPEATABLE_READ

public static final int TRANSACTION_REPEATABLE_READ
Description copied from class: DatabaseLogin
Dirty reads and non-repeatable reads are prevented; phantom reads can occur.

See Also:
Constant Field Values

TRANSACTION_SERIALIZABLE

public static final int TRANSACTION_SERIALIZABLE
Description copied from class: DatabaseLogin
Dirty reads, non-repeatable reads and phantom reads are prevented.

See Also:
Constant Field Values

xmlParserJARFileNames

public static java.lang.String[] xmlParserJARFileNames
Description copied from class: DatabaseLogin
The names of the TopLink SDK XML Support JAR files

Constructor Detail

DatabaseLogin

public DatabaseLogin()
Create a new login.


DatabaseLogin

public DatabaseLogin(DatabasePlatform databasePlatform)
ADVANCED: Create a new login for the given platform.

Method Detail

usePlatform

public void usePlatform(DatabasePlatform platform)
ADVANCED: Set the database platform to be custom platform.


addStructConverter

public void addStructConverter(StructConverter converter)
ADVANCED: Add a StructConverter

Parameters:
converter -
See Also:
StructConverter

bindAllParameters

public void bindAllParameters()
Bind all arguments to any SQL statement.


cacheAllStatements

public void cacheAllStatements()
Cache all prepared statements, this requires full parameter binding as well.

See Also:
bindAllParameters()

dontBindAllParameters

public void dontBindAllParameters()
Do not bind all arguments to any SQL statement.


dontCacheAllStatements

public void dontCacheAllStatements()
Do not cache all prepared statements.


dontOptimizeDataConversion

public void dontOptimizeDataConversion()
Disable driver level data conversion optimization. This can be disabled as some drivers perform data conversion themselves incorrectly.


dontUseBatchWriting

public void dontUseBatchWriting()
TopLink can be configured to use batch writing. This facility allows multiple write operations to be submitted to a database for processing at once. Submitting multiple updates together, instead of individually, can greatly improve performance in some situations.


dontUseByteArrayBinding

public void dontUseByteArrayBinding()
TopLink can be configured to use parameter binding for large binary data. By default TopLink will print this data as hex through the JDBC binary excape clause. Both binding and printing have various limits on all databases (e.g. 5k - 32k).


dontUseJDBCBatchWriting

public void dontUseJDBCBatchWriting()
Indicate to TopLink that the JDBC driver does not support batch writing. This will revert to the default behaviour which is to delegate to TopLink's internal batch writing.

See Also:
useJDBCBatchWriting(), setUsesJDBCBatchWriting(boolean usesJDBCBatchWriting)

dontUseNativeSequencing

public void dontUseNativeSequencing()
Deprecated. use setDefaultSequence(Sequence) instead, sequence could be: sequence = new TableSequence(); sequence = new UnaryTableSequence(); ....

OBSOLETE: TopLink can be configured to use a sequence table or native sequencing to generate unique object IDs. Native sequencing uses the ID generation service provided by the database (e.g. SEQUENCE objects on Oracle and IDENTITY columns on Sybase). By default a sequence table is used. Using a sequence table is recommended as it supports preallocation. (Native sequencing on Sybase/SQL Server/Informix does not support preallocation. Preallocation can be supported on Oracle by setting the increment size of the SEQUENCE object to match the preallocation size.)


dontUseNativeSQL

public void dontUseNativeSQL()
TopLink can be configured to use database-specific SQL grammar, as opposed to the JDBC standard grammar. This is because, unfortunately, some drivers to not support the full JDBC standard. By default TopLink uses the JDBC SQL grammar.


dontUseStreamsForBinding

public void dontUseStreamsForBinding()
TopLink can be configured to use streams to store large binary data.


dontUseStringBinding

public void dontUseStringBinding()
Do not bind strings of any size.


getConnectionString

public java.lang.String getConnectionString()
                                     throws ValidationException
Return the JDBC connection string. This is a combination of the driver-specific URL header and the database URL.

Throws:
ValidationException

getCursorCode

public int getCursorCode()
ADVANCED: Return the code for preparing cursored output parameters in a stored procedure


getDatabaseName

public java.lang.String getDatabaseName()
The database name is required when connecting to databases that support multiple databases within a single server instance (e.g. Sybase, SQL Server). This is ONLY used when connecting through ODBC type JDBC drivers. This is NEVER used with Oracle.


getDatabaseURL

public java.lang.String getDatabaseURL()
The database URL is the JDBC URL for the database server. The driver header is not be included in this URL (e.g. "dbase files"; not "jdbc:odbc:dbase files").


getDataSourceName

public java.lang.String getDataSourceName()
                                   throws ValidationException
The data source name is required if connecting through ODBC (JDBC-ODBC, etc.). This is the ODBC name given in the ODBC Data Source Administrator. This is just the database part of the URL.

Throws:
ValidationException

getDriverClassName

public java.lang.String getDriverClassName()
The driver class is the name of the Java class for the JDBC driver being used (e.g. "sun.jdbc.odbc.JdbcOdbcDriver").


getDriverURLHeader

public java.lang.String getDriverURLHeader()
The driver URL header is the string predetermined by the JDBC driver to be part of the URL connection string, (e.g. "jdbc:odbc:"). This is required to connect to the database.


getMaxBatchWritingSize

public int getMaxBatchWritingSize()
Allow for the max batch writing size to be set. This allows for the batch size to be limited as most database have strict limits. The size is in characters, the default is 32000 but the real value depends on the database configuration.


getPingSQL

public java.lang.String getPingSQL()
TopLink will attempt to test a connection if it encounters an exception on the connection when executing SQL. This attribute represents the SQL query that will be executed by TopLink. By default TopLink uses a query that should be correct for the specified platform but users may need or want to override that query.


getSequenceCounterFieldName

public java.lang.String getSequenceCounterFieldName()
Deprecated. use ((TableSequence)getDefaultSequence()).getCounterFieldName() instead

OBSOLETE: Return the name of the column in the TopLink sequence table that holds the current value for a given sequence (e.g. "SEQ_COUNT"). TopLink uses the sequence table to generate unique object IDs.


getSequenceNameFieldName

public java.lang.String getSequenceNameFieldName()
Deprecated. use ((TableSequence)getDefaultSequence()).getNameFieldName() instead

OBSOLETE: Return the name of the column in the TopLink sequence table that holds the name for a given sequence (e.g. "SEQ_NAME"). TopLink uses the sequence table to generate unique object IDs.


getQualifiedSequenceTableName

public java.lang.String getQualifiedSequenceTableName()
Deprecated. use ((TableSequence)getDefaultSequence()).getQualifiedTableName() instead

OBSOLETE: Return the the qualified name of the TOPLink sequence table.


getQueryRetryAttemptCount

public int getQueryRetryAttemptCount()
Return the number of attempts TopLink should make to re-connect to a database and re-execute a query after a query has failed because of a communication issue. TopLink will only attempt to reconnect when TopLink can determine that a communication failure occurred on a read query executed outside of a transaction. By default TopLink will attempt to retry the query 3 times, by setting this value to 0 TopLink will not retry queries.


getSequenceTableName

public java.lang.String getSequenceTableName()
Deprecated. use ((TableSequence)getDefaultSequence()).getTableName() instead

OBSOLETE: Return the name of the TopLink sequence table. TopLink uses a sequence table to generate unique object IDs.


getServerName

public java.lang.String getServerName()
The server name is the name of the database instance. This is ONLY required if using an ODBC JDBC driver and overriding the server name specified in the ODBC Data Source Administrator.


getShouldBindAllParameters

public boolean getShouldBindAllParameters()
Used to help bean introspection.


getShouldCacheAllStatements

public boolean getShouldCacheAllStatements()
Used to help bean introspection.


getShouldOptimizeDataConversion

public boolean getShouldOptimizeDataConversion()
Used to help bean introspection.


getShouldTrimStrings

public boolean getShouldTrimStrings()
Used to help bean introspection.


getStatementCacheSize

public int getStatementCacheSize()
If prepared statement caching is used, return the cache size. The default is 50.


getStringBindingSize

public int getStringBindingSize()
Used to help bean introspection.


getTransactionIsolation

public int getTransactionIsolation()
Return the transaction isolation setting for the connection. Return -1 if it has not been set.


getUsesBinding

public boolean getUsesBinding()
Used to help bean introspection.


getUsesNativeSequencing

public boolean getUsesNativeSequencing()
Used to help bean introspection.


getUsesNativeSQL

public boolean getUsesNativeSQL()
Used to help bean introspection.


getUsesStreamsForBinding

public boolean getUsesStreamsForBinding()
Used to help bean introspection.


getUsesStringBinding

public boolean getUsesStringBinding()
Used to help bean introspection.


getXMLParserJARFileNames

public static java.lang.String[] getXMLParserJARFileNames()
ADVANCED: Return the names of the TopLink SDK XML Support JAR files


handleTransactionsManuallyForSybaseJConnect

public void handleTransactionsManuallyForSybaseJConnect()
Force TopLink to manually begin transactions instead of using autoCommit. Although autoCommit should be used, and work, under JDBC, some drivers (e.g. Sybase JConnect) do not correctly map autoCommit to transactions, so stored procedures may not work correctly. This property should only be used as a workaround for the Sybase JConnect transaction problem.


isAnyOracleJDBCDriver

public boolean isAnyOracleJDBCDriver()
Return whether an Oracle JDBC driver is being used.


isCloudscapeJDBCDriver

public boolean isCloudscapeJDBCDriver()
Return whether a Cloudscape JDBC driver is being used.


isDB2JDBCDriver

public boolean isDB2JDBCDriver()
Return whether an IBM DB2 native client JDBC driver is being used.


isIntersolvSequeLinkDriver

public boolean isIntersolvSequeLinkDriver()
Return whether an Intersolv SeqeLink JDBC driver is being used.


isJConnectDriver

public boolean isJConnectDriver()
Return whether a Sybase JConnect JDBC driver is being used.


isJDBCConnectDriver

public boolean isJDBCConnectDriver()
Return whether a Borland JDBCConnect JDBC driver is being used.


isJDBCConnectRemoteDriver

public boolean isJDBCConnectRemoteDriver()
Return whether a Borland JDBCConnect JDBC driver is being used.


isJDBCODBCBridge

public boolean isJDBCODBCBridge()
Return whether a Sun/Merant JDBC-ODBC bridge driver is being used.


isOracle7JDBCDriver

public boolean isOracle7JDBCDriver()
Return whether an Oracle native 7.x OCI JDBC driver is being used.


isOracleJDBCDriver

public boolean isOracleJDBCDriver()
Return whether an Oracle 8.x native OCI JDBC driver is being used.


isOracleServerJDBCDriver

public boolean isOracleServerJDBCDriver()
Return whether an Oracle thin JDBC driver is being used.


isOracleThinJDBCDriver

public boolean isOracleThinJDBCDriver()
Return whether an Oracle thin JDBC driver is being used.


isWebLogicOracleOCIDriver

public boolean isWebLogicOracleOCIDriver()
Return whether a WebLogic Oracle OCI JDBC driver is being used.


isWebLogicSQLServerDBLibDriver

public boolean isWebLogicSQLServerDBLibDriver()
Return whether a WebLogic SQL Server dblib JDBC driver is being used.


isWebLogicSQLServerDriver

public boolean isWebLogicSQLServerDriver()
Return whether a WebLogic SQL Server JDBC driver is being used.


isWebLogicSybaseDBLibDriver

public boolean isWebLogicSybaseDBLibDriver()
Return whether a WebLogic Sybase dblib JDBC driver is being used.


isWebLogicThinClientDriver

public boolean isWebLogicThinClientDriver()
Return whether a WebLogic thin client JDBC driver is being used.


isWebLogicThinDriver

public boolean isWebLogicThinDriver()
Return whether a WebLogic thin JDBC driver is being used.


optimizeDataConversion

public void optimizeDataConversion()
Enable driver level data conversion optimization. This can be disabled as some drivers perform data conversion themselves incorrectly.


setConnectionString

public void setConnectionString(java.lang.String url)
                         throws ValidationException
Set the JDBC connection string. This is the full JDBC connect URL. Normally TopLink breaks this into two parts to allow for the driver header to be automatically set, however sometimes it is easier just to set the entire URL at once.

Throws:
ValidationException

setCursorCode

public void setCursorCode(int cursorCode)
ADVANCED: Set the code for preparing cursored output parameters in a stored procedure


setDatabaseName

public void setDatabaseName(java.lang.String databaseName)
The database name is required when connecting to databases that support multiple databases within a single server instance (e.g. Sybase, SQL Server). This is ONLY used when connecting through ODBC type JDBC drivers. This is NEVER used with Oracle.


setDatabaseURL

public void setDatabaseURL(java.lang.String databaseURL)
                    throws ValidationException
The database URL is the JDBC URL for the database server. The driver header should not be included in this URL (e.g. "dbase files"; not "jdbc:odbc:dbase files").

Throws:
ValidationException

setDataSourceName

public void setDataSourceName(java.lang.String dataSourceName)
Deprecated. since 10.1.3 replaced by setODBCDataSourceName(String)

OBSOLETE: This API canot be used with a J2EE DataSource. The data source name is required if connecting through ODBC (JDBC-ODBC, etc.). This is the ODBC name given in the ODBC Data Source Administrator. This is just the database part of the URL.


setODBCDataSourceName

public void setODBCDataSourceName(java.lang.String dataSourceName)
The data source name is required if connecting through ODBC (JDBC-ODBC, etc.). This is the ODBC name given in the ODBC Data Source Administrator. This is just the database part of the URL.


setDefaultNullValue

public void setDefaultNullValue(java.lang.Class type,
                                java.lang.Object value)
The default value to substitute for database NULLs can be configured on a per-class basis. Example: login.setDefaultNullValue(long.class, new Long(0))

Overrides:
setDefaultNullValue in class DatasourceLogin

setDriverClass

public void setDriverClass(java.lang.Class driverClass)
The driver class is the Java class for the JDBC driver to be used (e.g. sun.jdbc.odbc.JdbcOdbcDriver.class).


setDriverClassName

public void setDriverClassName(java.lang.String driverClassName)
                        throws ValidationException
The name of the JDBC driver class to be used (e.g. "sun.jdbc.odbc.JdbcOdbcDriver").

Throws:
ValidationException

setDriverURLHeader

public void setDriverURLHeader(java.lang.String driverURLHeader)
                        throws ValidationException
The driver URL header is the string predetermined by the JDBC driver to be part of the URL connection string, (e.g. "jdbc:odbc:"). This is required to connect to the database.

Throws:
ValidationException

setMaxBatchWritingSize

public void setMaxBatchWritingSize(int maxBatchWritingSize)
Allow for the max batch writing size to be set. This allows for the batch size to be limited as most database have strict limits. The size is in characters, the default is 32000 but the real value depends on the database configuration.


setPingSQL

public void setPingSQL(java.lang.String pingSQL)
TopLink will attempt to test a connection if it encounters an exception on the connection when executing SQL. This attribute represents the SQL query that will be executed by TopLink. By default TopLink uses a query that should be correct for the specified platform but users may need or want to override that query.


setQueryRetryAttemptCount

public void setQueryRetryAttemptCount(int queryRetryAttemptCount)
Set the number of attempts TopLink should make to re-connect to a database and re-execute a query after a query has failed because of a communication issue. TopLink will only attempt to reconnect when TopLink can determine that a communication failure occurred on a read query executed outside of a transaction. By default TopLink will attempt to retry the query 3 times, by setting this value to 0 TopLink will not retry queries.


setSequenceCounterFieldName

public void setSequenceCounterFieldName(java.lang.String name)
Deprecated. use ((TableSequence)getDefaultSequence()).setCounterFieldName(String) instead

OBSOLETE: Set the name of the column in the TopLink sequence table that holds the current value for a given sequence (e.g. "SEQ_COUNT"). TopLink uses the sequence table to generate unique object IDs.


setSequenceNameFieldName

public void setSequenceNameFieldName(java.lang.String name)
Deprecated. use ((TableSequence)getDefaultSequence()).setNameFieldName(String) instead

OBSOLETE: Set the name of the column in the TopLink sequence table that holds the name for a given sequence (e.g. "SEQ_NAME"). TopLink uses the sequence table to generate unique object IDs.


setSequenceTableName

public void setSequenceTableName(java.lang.String name)
Deprecated. use ((TableSequence)getDefaultSequence()).setTableName(String) instead

OBSOLETE: Set the name of the TopLink sequence table. TopLink uses a sequence table to generate unique object IDs.


setServerName

public void setServerName(java.lang.String name)
The server name is the name of the database instance. This is ONLY used when connecting through ODBC type JDBC drivers, and only if the data source does not specify it already.


setShouldBindAllParameters

public void setShouldBindAllParameters(boolean shouldBindAllParameters)
Set whether to bind all arguments to any SQL statement.


setShouldCacheAllStatements

public void setShouldCacheAllStatements(boolean shouldCacheAllStatements)
Set whether prepared statements should be cached.


setShouldForceFieldNamesToUpperCase

public void setShouldForceFieldNamesToUpperCase(boolean shouldForceFieldNamesToUpperCase)
ADVANCED: This setting can be used if the application expects upper case but the database does not return consistent case (e.g. different databases).


setShouldIgnoreCaseOnFieldComparisons

public static void setShouldIgnoreCaseOnFieldComparisons(boolean shouldIgnoreCaseOnFieldComparisons)
ADVANCED: Allow for case in field names to be ignored as some databases are not case sensitive. When using custom this can be an issue if the fields in the descriptor have a different case.


setShouldOptimizeDataConversion

public void setShouldOptimizeDataConversion(boolean value)
Set whether driver level data conversion optimization is enabled. This can be disabled as some drivers perform data conversion themselves incorrectly.


setShouldTrimStrings

public void setShouldTrimStrings(boolean shouldTrimStrings)
By default CHAR field values have trailing blanks trimmed, this can be configured.


setStatementCacheSize

public void setStatementCacheSize(int size)
If prepared statement caching is used this configures the cache size. The default is 50.


setStringBindingSize

public void setStringBindingSize(int stringBindingSize)
Used to help bean introspection.


setTableQualifier

public void setTableQualifier(java.lang.String qualifier)
Set the default qualifier for all tables. This can be the creator of the table or database name the table exists on. This is required by some databases such as Oracle and DB2.

Overrides:
setTableQualifier in class DatasourceLogin

setTransactionIsolation

public void setTransactionIsolation(int isolationLevel)
Set the transaction isolation setting for the connection. This is an optional setting. The default isolation level set on the database will apply if it is not set here. Use one of the TRANSACTION_* constants for valid input values. Note: This setting will only take effect upon connection.


setUsesBatchWriting

public void setUsesBatchWriting(boolean value)
TopLink can be configured to use batch writing. This facility allows multiple write operations to be submitted to a database for processing at once. Submitting multiple updates together, instead of individually, can greatly improve performance in some situations.


setUsesBinding

public void setUsesBinding(boolean value)
Deprecated. replaced by setUsesByteArrayBinding(boolean)

OBSOLETE:

See Also:
setUsesByteArrayBinding(boolean)

setUsesByteArrayBinding

public void setUsesByteArrayBinding(boolean value)
TopLink can be configured to use parameter binding for large binary data. By default TopLink will print this data as hex through the JDBC binary excape clause. Both binding and printing have various limits on all databases (e.g. 5k - 32k).


setUsesJDBCBatchWriting

public void setUsesJDBCBatchWriting(boolean usesJDBCBatchWriting)
Calling this method with an argument of true indicates to TopLink that the JDBC driver supports batch writing. TopLink's internal batch writing is disabled.

Calling this method with an argument of false indicates to TopLink that the JDBC driver does not support batch writing. This will revert to the default behaviour which is to delegate to TopLink's internal batch writing.

Parameters:
usesJDBCBatchWriting - boolean true delegates batch writing to the JDBC driver and false delegates batch writing to TopLink.

setUsesNativeSequencing

public void setUsesNativeSequencing(boolean useNativeSequencing)
Deprecated. use setDefaultSequence(Sequence) instead, sequence could be: sequence = new TableSequence(); sequence = new UnaryTableSequence(); sequence = new NativeSequence(); ...

OBSOLETE: TopLink can be configured to use a sequence table, or native sequencing to generate unique object ids. Native sequencing uses the id generation service provided by the database, such as "sequence" objects on Oracle and "identity" columns on Sybase. By default a sequence table is used and suggested to be used as it allows for sequence Preallocation which cannot be done through native sequencing.


setUsesNativeSQL

public void setUsesNativeSQL(boolean value)
TopLink can be configured to use database specific sql grammar not JDBC specific. This is because unfortunately some bridges to not support the full JDBC standard. By default TopLink uses the JDBC sql grammar.


setUsesStreamsForBinding

public void setUsesStreamsForBinding(boolean value)
TopLink can be configured to use streams to store large binary data. This can improve the max size for reading/writing on some JDBC drivers.


setUsesStringBinding

public void setUsesStringBinding(boolean usesStringBindingSize)
Used to help bean introspection.


setXMLParserJARFileNames

public static void setXMLParserJARFileNames(java.lang.String[] jarFileNames)
ADVANCED: Specify the names of the TopLink SDK XML Support JAR files. This must be used if the application needs different version of the various public XML packages (e.g. org.w3c.dom, org.xml.sax, org.apache.xerces) than those used by TopLink. Example: DatabaseLogin.setXMLParserJARFileNames(new String[] {"xerces.jar", "TopLinkXerces.jar"});


shouldBindAllParameters

public boolean shouldBindAllParameters()
Bind all arguments to any SQL statement.


shouldCacheAllStatements

public boolean shouldCacheAllStatements()
Cache all prepared statements, this requires full parameter binding as well.


shouldForceFieldNamesToUpperCase

public boolean shouldForceFieldNamesToUpperCase()
ADVANCED: Can be used if the app expects upper case but the database is not return consistent case, i.e. different databases.


shouldIgnoreCaseOnFieldComparisons

public static boolean shouldIgnoreCaseOnFieldComparisons()
ADVANCED: Allow for case in field names to be ignored as some databases are not case sensitive. When using custom this can be an issue if the fields in the descriptor have a different case.


shouldOptimizeDataConversion

public boolean shouldOptimizeDataConversion()
Return if our driver level data conversion optimization is enabled. This can be disabled as some drivers perform data conversion themselves incorrectly.


shouldTrimStrings

public boolean shouldTrimStrings()
By default CHAR field values have trailing blanks trimmed, this can be configured.


shouldUseBatchWriting

public boolean shouldUseBatchWriting()
TopLink can be configured to use batch writing. This facility allows multiple write operations to be submitted to a database for processing at once. Submitting multiple updates together, instead of individually, can greatly improve performance in some situations.


shouldUseByteArrayBinding

public boolean shouldUseByteArrayBinding()
TopLink can be configured to use parameter binding for large binary data. By default TopLink will print this data as hex through the JDBC binary excape clause. Both binding and printing have various limits on all databases (e.g. 5k - 32k).


shouldUseJDBCBatchWriting

public boolean shouldUseJDBCBatchWriting()
Answers true if TopLink has JDBC batch writing enabled. This is the case if setUsesJDBCBatchWriting(true) has been called.

Returns:
boolean true if batch writing is delegated to the JDBC driver. Returns false if delegated to TopLink.
See Also:
useJDBCBatchWriting(), dontUseJDBCBatchWriting(), setUsesJDBCBatchWriting(boolean usesJDBCBatchWriting)

shouldUseNativeSequencing

public boolean shouldUseNativeSequencing()
TopLink can be configured to use a sequence table or native sequencing to generate unique object IDs. Native sequencing uses the ID generation service provided by the database (e.g. SEQUENCE objects on Oracle and IDENTITY columns on Sybase). By default a sequence table is used. Using a sequence table is recommended as it supports preallocation. (Native sequencing on Sybase/SQL Server/Informix does not support preallocation. Preallocation can be supported on Oracle by setting the increment size of the SEQUENCE object to match the preallocation size.)


shouldUseNativeSQL

public boolean shouldUseNativeSQL()
TopLink can be configured to use database-specific SQL grammar, as opposed to the JDBC standard grammar. This is because, unfortunately, some drivers to not support the full JDBC standard. By default TopLink uses the JDBC SQL grammar.


shouldUseStreamsForBinding

public boolean shouldUseStreamsForBinding()
TopLink can be configured to use streams to store large binary data.


shouldUseStringBinding

public boolean shouldUseStringBinding()
TopLink can be configured to bind large strings.


toString

public java.lang.String toString()
Print all of the connection information.

Overrides:
toString in class DatasourceLogin

useAccess

public void useAccess()
Set the database platform to be Access.


useBatchWriting

public void useBatchWriting()
TopLink can be configured to use batch writing. This facility allows multiple write operations to be submitted to a database for processing at once. Submitting multiple updates together, instead of individually, can greatly improve performance in some situations.


useByteArrayBinding

public void useByteArrayBinding()
TopLink can be configured to use parameter binding for large binary data. By default TopLink will print this data as hex through the JDBC binary excape clause. Both binding and printing have various limits on all databases (e.g. 5k - 32k).


useCloudscape

public void useCloudscape()
Set the database platform to be Cloudscape.


useDerby

public void useDerby()

useCloudscapeDriver

public void useCloudscapeDriver()
Use the Cloudscape JDBC driver.


useDB2

public void useDB2()
Set the database platform to be DB2.


useDB2JDBCDriver

public void useDB2JDBCDriver()
Use the IBM DB2 native client interface.


useDB2NetJDBCDriver

public void useDB2NetJDBCDriver()
Use the IBM DB2 thin JDBC driver.


useDBase

public void useDBase()
Set the database platform to be DBase.


useDefaultDriverConnect

public void useDefaultDriverConnect()
Connect to the JDBC driver via DriverManager.

See Also:
useDirectDriverConnect()

useDefaultDriverConnect

public void useDefaultDriverConnect(java.lang.String driverClassName,
                                    java.lang.String driverURLHeader,
                                    java.lang.String databaseURL)
Connect to the JDBC driver via DriverManager.

See Also:
useDirectDriverConnect(String, String, String)

useDirectDriverConnect

public void useDirectDriverConnect()
Some JDBC drivers don't support connecting correctly (via DriverManager), but do support connecting incorrectly (e.g. Castanet).

See Also:
useDirectDriverConnect()

useDataSource

public void useDataSource(java.lang.String dataSource)
Specify the J2EE DataSource name to connect to. Also enable external connection pooling.

See Also:
JNDIConnector

useJTADataSource

public void useJTADataSource(java.lang.String dataSource)
Specify the J2EE JTA enabled DataSource name to connect to. Also enable external transaction control and connection pooling.

See Also:
JNDIConnector

useDirectDriverConnect

public void useDirectDriverConnect(java.lang.String driverClassName,
                                   java.lang.String driverURLHeader,
                                   java.lang.String databaseURL)
Some JDBC drivers don't support connecting correctly (via DriverManager), but do support connecting incorrectly (e.g. Castanet).

See Also:
useDefaultDriverConnect(String, String, String)

useExternalConnectionPooling

public void useExternalConnectionPooling()
Use external connection pooling, such as WebLogic's JTS driver.

Overrides:
useExternalConnectionPooling in class DatasourceLogin
See Also:
DatasourceLogin.dontUseExternalConnectionPooling(), DatasourceLogin.shouldUseExternalConnectionPooling()

useExternalTransactionController

public void useExternalTransactionController()
Use an external transaction controller such as a JTS service

Overrides:
useExternalTransactionController in class DatasourceLogin
See Also:
DatasourceLogin.dontUseExternalTransactionController(), DatasourceLogin.shouldUseExternalTransactionController()

useHSQL

public void useHSQL()
Use the HSQL JDBC driver.


useHSQLDriver

public void useHSQLDriver()
Use the HSQL JDBC driver.


useINetSQLServerDriver

public void useINetSQLServerDriver()
Use the i-net SQL Server JDBC driver.


useInformix

public void useInformix()
Set the database platform to be Informix.


useIntersolvSequeLinkDriver

public void useIntersolvSequeLinkDriver()
Use the Intersolv/Merant SequeLink JDBC driver.


useJConnect50Driver

public void useJConnect50Driver()
Use the Sybase JConnect JDBC driver.


useJConnectDriver

public void useJConnectDriver()
Use the Sybase JConnect JDBC driver.


useJDBC

public void useJDBC()
Set the database platform to be JDBC.


useJDBCBatchWriting

public void useJDBCBatchWriting()
TopLink support batch writing in both JDK 1.1 abd JDK 1.2. In JDK 1.2 either the batch support provided by the JDBC driver can be used, or TopLink's built-in support, this allow for this to be set. By default the driver is used in JDK 1.2. Some JDBC 2 drivers to not support batching, so this lets are own batching be used.


useJDBCConnectDriver

public void useJDBCConnectDriver()
Use the Borland JDBCConnect JDBC driver.


useJDBCConnectRemoteDriver

public void useJDBCConnectRemoteDriver()
Use the Borland JDBCConnect JDBC driver.


useJDBCODBCBridge

public void useJDBCODBCBridge()
User the Sun/Merant JDBC-ODBC bridge driver.


useMySQL

public void useMySQL()
Set the database platform to be MySQL.


useNativeSequencing

public void useNativeSequencing()
TopLink can be configured to use a sequence table or native sequencing to generate unique object IDs. Native sequencing uses the ID generation service provided by the database (e.g. SEQUENCE objects on Oracle and IDENTITY columns on Sybase). By default a sequence table is used. Using a sequence table is recommended as it supports preallocation. (Native sequencing on Sybase/SQL Server/Informix does not support preallocation. Preallocation can be supported on Oracle by setting the increment size of the SEQUENCE object to match the preallocation size.)


useNativeSQL

public void useNativeSQL()
TopLink can be configured to use database-specific SQL grammar, as opposed to the JDBC standard grammar. This is because, unfortunately, some drivers to not support the full JDBC standard. By default TopLink uses the JDBC SQL grammar.


useOracle

public void useOracle()
Set the database platform to be Oracle.


useOracle7JDBCDriver

public void useOracle7JDBCDriver()
Use the Oracle 7.x native OCI JDBC driver.


useOracleJDBCDriver

public void useOracleJDBCDriver()
Use the Oracle 8.x native OCI JDBC driver.


useOracleServerJDBCDriver

public void useOracleServerJDBCDriver()
Use the Oracle server JDBC driver.


useOracleThinJDBCDriver

public void useOracleThinJDBCDriver()
Use the Oracle thin JDBC driver.


usePointBase

public void usePointBase()
Set the database platform to be PointBase.


usePointBaseDriver

public void usePointBaseDriver()
Use the PointBase JDBC driver.


useSQLServer

public void useSQLServer()
Set the database platform to be SQL Server.


useStreamsForBinding

public void useStreamsForBinding()
TopLink can be configured to use streams to store large binary data.


useStringBinding

public void useStringBinding()
Bind strings larger than 255 characters.


useStringBinding

public void useStringBinding(int size)
Bind strings that are larger than the specified size. Strings that are smaller will not be bound.


useSybase

public void useSybase()
Set the database platform to be Sybase.


useWebLogicDriverCursoredOutputCode

public void useWebLogicDriverCursoredOutputCode()
Set the prepare cursor code to what the WebLogic Oracle OCI JDBC driver expects.


useWebLogicJDBCConnectionPool

public void useWebLogicJDBCConnectionPool(java.lang.String poolName)
Set a WebLogic JDBC connection pool (a pool must be defined for the entity beans that are to be deployed)


useWebLogicOracleOCIDriver

public void useWebLogicOracleOCIDriver()
Use the WebLogic Oracle OCI JDBC driver.


useWebLogicSQLServerDBLibDriver

public void useWebLogicSQLServerDBLibDriver()
Use the WebLogic SQL Server dblib JDBC driver.


useWebLogicSQLServerDriver

public void useWebLogicSQLServerDriver()
Use the WebLogic SQL Server JDBC driver.


useWebLogicSybaseDBLibDriver

public void useWebLogicSybaseDBLibDriver()
Use the WebLogic Sybase dblib JDBC driver.


useWebLogicThinClientDriver

public void useWebLogicThinClientDriver()
Use the WebLogic thin client JDBC driver.


useWebLogicThinDriver

public void useWebLogicThinDriver()
Use the WebLogic thin JDBC driver.


getDelayBetweenConnectionAttempts

public int getDelayBetweenConnectionAttempts()
Returns the number of milliseconds that TopLink will wait between attempts to reconnect a DatabaseConnection in the case TopLink is attempting to retry a query, the default is 5000. TopLink will retry a read query outside of a transaction if TopLink can determine that a communication error occured with the database.


setDelayBetweenConnectionAttempts

public void setDelayBetweenConnectionAttempts(int delayBetweenConnectionAttempts)
Stores the number of milliseconds that TopLink will wait between attempts to reconnect a DatabaseConnection in the case TopLink is attempting to retry a query. TopLink will retry a read query outside of a transaction if TopLink can determine that a communication error occured with the database.


isConnectionHealthValidatedOnError

public boolean isConnectionHealthValidatedOnError()
This value defaults to true if 'ping SQL' is available on the platform. On an SQL Exception TopLink will ping the database to determine if the connection used can continue to be used for queries. This should have no impact on applications unless the user is using pessimistic locking queries with 'no wait' or are using a query timeout feature. If that is the case and the application is experiencing a performance impact from the health check then this feature can be turned off. Turning this feature off will prevent TopLink from being able to retry queries in the case of database failure.

Specified by:
isConnectionHealthValidatedOnError in interface Login
Overrides:
isConnectionHealthValidatedOnError in class DatasourceLogin

setConnectionHealthValidatedOnError

public void setConnectionHealthValidatedOnError(boolean isConnectionHealthValidatedOnError)
This value defaults to true and on an SQL Exception TopLink will ping the database to determine if the connection used can continue to be used for queries. This should have no impact on applications unless the user is using pessimistic locking queries with 'no wait' or are using a query timeout feature. If that is the case and the application is experiencing a performance impact from the health check then this feature can be turned off. Turning this feature off will prevent TopLink from being able to retry queries in the case of database failure.


Copyright © 1998, 2012, Oracle. All Rights Reserved.