public class AS400JDBCManagedDataSource
extends java.lang.Object
implements javax.sql.DataSource, javax.naming.Referenceable, java.io.Serializable, java.lang.Cloneable
A DataSource is a factory for connections to the physical data source that this DataSource object represents. An alternative to the DriverManager facility, a DataSource object is the preferred means of getting a connection. An object that implements the DataSource interface will typically be registered with a naming service based on the Java Naming and Directory (JNDI) API.
A DataSource object has properties that can be modified when necessary. For example, if the data source is moved to a different system, the property for the system can be changed. The benefit is that because the data source's properties can be changed, any code accessing that data source does not need to be changed.
A driver that is accessed via a DataSource object does not register itself with the DriverManager. Rather, a DataSource o bject is retrieved though a lookup operation and then used to create a Connection object. With a basic implementation, the connection obtained through a DataSource object is identical to a connection obtained through the DriverManager facility.
Caution: To avoid the pitfalls of "double-managed" pools, do not use this class in conjunction with a separate
connection pool manager, such as that available in WebSphere. When a separate pool manager is provided,
use AS400JDBCDataSource
instead.
Modifier and Type | Field and Description |
---|---|
static int |
MAX_STORAGE_LIMIT
The maximum storage space that can be used to execute a query.
|
static int |
SERVER_TRACE_DEBUG_SERVER_JOB
Start debug on the JDBC server job.
|
static int |
SERVER_TRACE_SAVE_SERVER_JOBLOG
Save the joblog when the JDBC server job ends.
|
static int |
SERVER_TRACE_SAVE_SQL_INFORMATION
Save SQL information.
|
static int |
SERVER_TRACE_START_DATABASE_MONITOR
Start the database monitor on the JDBC server job.
|
static int |
SERVER_TRACE_TRACE_SERVER_JOB
Start job trace on the JDBC server job.
|
Constructor and Description |
---|
AS400JDBCManagedDataSource()
Constructs a default AS400JDBCManagedDataSource object.
|
AS400JDBCManagedDataSource(java.lang.String serverName)
Constructs an AS400JDBCManagedDataSource object to the specified serverName.
|
AS400JDBCManagedDataSource(java.lang.String serverName,
java.lang.String user,
char[] password)
Constructs an AS400JDBCManagedDataSource object with the specified signon information.
|
AS400JDBCManagedDataSource(java.lang.String serverName,
java.lang.String user,
java.lang.String password)
Deprecated.
Use AS400JDBCManagedDataSource(String serverName, String user, char[] password) instead.
|
AS400JDBCManagedDataSource(java.lang.String serverName,
java.lang.String user,
java.lang.String password,
java.lang.String keyRingName,
java.lang.String keyRingPassword)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkPoolHealth(boolean logStatistics)
Verifies the health of the connection pool.
|
java.lang.Object |
clone()
Method to create a clone of AS400JDBCManagedDataSource.
|
void |
closePool()
Shuts down the connection pool in an orderly manner.
|
java.lang.String |
getAccess()
Returns the level of database access for the connection.
|
int |
getAffinityFailbackInterval()
Returns the affinityFailbackInterval setting.
|
int |
getBehaviorOverride()
Returns what behaviors of the Toolbox JDBC driver have been overridden.
|
int |
getBidiStringType()
Returns the output string type of bidi data.
|
int |
getBlockCriteria()
Returns the criteria for retrieving data from the system in
blocks of records.
|
int |
getBlockSize()
Returns the block size in kilobytes to retrieve from the IBM i system and
cache on the client.
|
java.lang.String |
getCharacterTruncation()
Returns the behavior to use when character truncation occurs
|
java.lang.String |
getClientRerouteAlternatePortNumber()
Returns the client reroute alternate server name.
|
java.lang.String |
getClientRerouteAlternateServerName()
Returns the client reroute alternate server name.
|
int |
getConcurrentAccessResolution()
This method returns the concurrent access resolution setting.
|
java.sql.Connection |
getConnection()
Returns a database connection.
|
java.sql.Connection |
getConnection(java.lang.String user,
char[] password)
Returns a database connection using the specified user and password.
|
java.sql.Connection |
getConnection(java.lang.String user,
java.lang.String password)
Deprecated.
Use getConnection(String user, char[] password) instead.
|
java.lang.String |
getCursorSensitivity()
Returns the value of the cursorSensitivity property.
|
java.lang.String |
getDatabaseName()
Returns the value of the databaseName property.
|
java.lang.String |
getDataSourceName()
Returns the value of the dataSourceName property.
|
java.lang.String |
getDateFormat()
Returns the date format used in date literals within SQL statements.
|
java.lang.String |
getDateSeparator()
Returns the date separator used in date literals within SQL statements.
|
java.lang.String |
getDecfloatRoundingMode()
Returns the decfloat rounding mode.
|
java.lang.String |
getDecimalDataErrors()
Returns the decimal data errors setting.
|
java.lang.String |
getDecimalSeparator()
Returns the decimal separator used in numeric literals within SQL statements.
|
java.lang.String |
getDescribeOption()
Returns the describe option setting.
|
java.lang.String |
getDescription()
Returns the description of the data source.
|
java.lang.String |
getDriver()
Returns the JDBC driver implementation.
|
int |
getEnableClientAffinitiesList()
Returns the enableClientAffinitiesList setting.
|
int |
getEnableSeamlessFailover()
Returns the affinityFailbackInteval setting.
|
java.lang.String |
getErrors()
Returns the amount of detail for error messages originating from
the IBM i system.
|
java.lang.String |
getIgnoreWarnings()
Returns the ignore warnings property.
|
java.lang.String |
getLibraries()
Returns the libraries to add to the server job's library list.
|
int |
getLobThreshold()
Returns the maximum LOB (large object) size in bytes that
can be retrieved as part of a result set.
|
int |
getLoginTimeout()
Returns the timeout value in seconds.
|
java.io.PrintWriter |
getLogWriter()
Returns the log writer for this data source.
|
int |
getMaximumBlockedInputRows()
Gets the maximum block input rows.
|
int |
getMaximumPrecision()
Gets the maximum precision property.
|
int |
getMaximumScale()
Gets the maximum scale property.
|
int |
getMaxRetriesForClientReroute()
Returns the maxRetriesForClientReroute setting.
|
int |
getMetadataSource()
Indicates how to retrieve DatabaseMetaData.
|
int |
getMetaDataSource()
Indicates how to retrieve DatabaseMetaData.
|
int |
getMinimumDivideScale()
Gets the minimum divide scale property.
|
java.lang.String |
getNaming()
Returns the naming convention used when referring to tables.
|
java.lang.String |
getNumericRangeError()
Returns the behavior to use when an numeric range error occurs
|
java.lang.String |
getPackage()
Returns the base name of the SQL package.
|
int |
getPackageCcsid()
Gets the package CCSID property, which indicates the
CCSID in which statements are sent to the IBM i system and
also the CCSID of the package they are stored in.
|
int |
getPackageCCSID()
Gets the package CCSID property, which indicates the
CCSID in which statements are sent to the IBM i system and
also the CCSID of the package they are stored in.
|
java.lang.String |
getPackageCriteria()
Returns the type of SQL statement to be stored in the SQL package.
|
java.lang.String |
getPackageError()
Returns the action to take when SQL package errors occur.
|
java.lang.String |
getPackageLibrary()
Returns the library for the SQL package.
|
int |
getPortNumber()
Returns the port number.
|
java.lang.String |
getProxyServer()
Returns the name of the proxy server.
|
java.lang.String |
getQaqqinilib()
Returns the QAQQINI library name.
|
java.lang.String |
getQaqqiniLibrary()
Returns the QAQQINI library name.
|
int |
getQueryOptimizeGoal()
Returns the "query optimize goal" property
|
java.lang.String |
getQueryReplaceTruncatedParameter()
Returns the string to be substituted for a truncated parameter
on a query.
|
int |
getQueryStorageLimit()
Returns the storage limit in megabytes, that should be used for statements executing a query in a connection.
|
java.lang.String |
getQueryTimeoutMechanism()
Returns the mechanism used to implement query timeout.
|
int |
getReceiveBufferSize()
Gets the socket 'receive buffer size' option.
|
javax.naming.Reference |
getReference()
Returns the Reference object for the data source object.
|
java.lang.String |
getRemarks()
Returns the source of the text for REMARKS columns in ResultSets returned
by DatabaseMetaData methods.
|
int |
getRetryIntervalForClientReroute()
Returns the retryIntervalForClientReroute setting.
|
java.lang.String |
getSecondaryUrl()
Returns the secondary URL.
|
java.lang.String |
getSecondaryURL()
Returns the secondary URL.
|
int |
getSendBufferSize()
Gets the socket 'send buffer size' option.
|
java.lang.String |
getServerName()
Returns the value of the serverName property.
|
int |
getServerTrace()
Returns the level of tracing started on the JDBC server job.
|
int |
getServerTraceCategories()
Returns the level of tracing started on the JDBC server job.
|
long |
getSocketTimeout()
Gets the socket timeout option in milliseconds.
|
long |
getSoLinger()
Gets the socket 'linger' option, in milliseconds.
|
java.lang.String |
getSort()
Returns how the IBM i system sorts records before sending them to the
client.
|
java.lang.String |
getSortLanguage()
Returns the three-character language id to use for selection of a sort sequence.
|
java.lang.String |
getSortTable()
Returns the library and file name of a sort sequence table stored on the
IBM i system.
|
java.lang.String |
getSortWeight()
Returns how the IBM i system treats case while sorting records.
|
long |
getSoTimeout()
Gets the socket 'timeout' option in milliseconds.
|
java.lang.String |
getTimeFormat()
Returns the time format used in time literals with SQL statements.
|
java.lang.String |
getTimeSeparator()
Returns the time separator used in time literals within SQL
statements.
|
java.lang.String |
getTimestampFormat()
Returns the timestamp format used by getString.
|
java.lang.String |
getToolboxTrace()
Returns the toolbox trace category.
|
java.lang.String |
getToolboxTraceCategory()
Returns the toolbox trace category.
|
java.lang.String |
getTransactionIsolation()
Returns the IBM i system's transaction isolation.
|
java.lang.String |
getTranslateHex()
Gets the translate hex property, which indicates how
the parser will treat hexadecimal literals.
|
java.lang.String |
getUser()
Returns the value of the 'user' property.
|
protected java.lang.String[] |
getValidWrappedList() |
java.lang.String |
getVariableFieldCompression()
Gets the variable field compression property, which when variable field compression is used.
|
int |
getXALooselyCoupledSupport()
Returns the value of the "XA loosely couple support" property.
|
void |
invalidate(java.lang.String user,
java.lang.String password)
Invalidates all pooled connections for the specified user/password.
|
boolean |
isAutoCommit()
Returns whether auto-commit mode is the default connection mode for new connections.
|
boolean |
isAutocommitException()
Returns whether commit or rollback throws SQLException when autocommit is enabled.
|
boolean |
isBidiImplicitReordering()
Indicates whether bidi implicit reordering is used.
|
boolean |
isBidiNumericOrdering()
Indicates whether bidi numeric ordering round trip is used.
|
boolean |
isBigDecimal()
Indicates whether a big decimal value is returned.
|
boolean |
isCursorHold()
Indicates whether the cursor is held.
|
boolean |
isDataCompression()
Indicates whether data compression is used.
|
boolean |
isDataTruncation()
Indicates whether data truncation is used.
|
boolean |
isExtendedDynamic()
Indicates whether extended dynamic support is used.
|
boolean |
isExtendedMetadata()
Indicates whether the driver should request extended metadata from the
IBM i system.
|
boolean |
isExtendedMetaData()
Indicates whether the driver should request extended metadata from the
IBM i system.
|
boolean |
isFullOpen()
Indicates whether the IBM i system fully opens a file when performing a query.
|
boolean |
isHoldInputLocators()
Returns the value of the "hold input locators" property
|
boolean |
isHoldStatements()
Returns the value of the "hold statements" property
|
boolean |
isJvm16Synchronize()
Indicates whether the temporary fix for JVM 1.6 is enabled.
|
boolean |
isKeepAlive()
Gets the socket 'keepalive' option.
|
boolean |
isLazyClose()
Indicates whether to delay closing cursors until subsequent requests.
|
boolean |
isPackageAdd()
Indicates whether to add newly prepared statements to the
SQL package specified on the "package" property.
|
boolean |
isPackageCache()
Indicates whether a subset of the SQL package information is cached in client memory.
|
boolean |
isPackageClear()
Deprecated.
|
boolean |
isPrefetch()
Indicates whether data is prefetched upon executing a SELECT statement.
|
boolean |
isPrompt()
Indicates whether the user is prompted if a user name or password is
needed to connect to the IBM i system.
|
boolean |
isRollbackCursorHold()
Returns the value of the "rollback cursor hold" property.
|
boolean |
isSavePasswordWhenSerialized()
Indicates whether the password is saved locally with the rest of
the properties when this data source object is serialized.
|
boolean |
isSecure()
Indicates whether a Secure Socket Layer (SSL) connection is used to communicate
with the IBM i system.
|
boolean |
isSecureCurrentUser()
Returns the secure current user setting.
|
boolean |
isTcpNoDelay()
Gets the socket 'TCP no delay' option.
|
boolean |
isThreadUsed()
Indicates whether a thread is used.
|
boolean |
isTrace()
Indicates whether trace messages should be logged.
|
boolean |
isTranslateBinary()
Indicates whether binary data is translated.
|
boolean |
isTranslateBoolean()
Indicates how Boolean objects are interpreted when setting the value
for a character field/parameter using the PreparedStatement.setObject(),
CallableStatement.setObject() or ResultSet.updateObject() methods.
|
boolean |
isTrueAutocommit()
Indicates whether true auto commit support is used.
|
boolean |
isTrueAutoCommit()
Indicates whether true auto commit support is used.
|
boolean |
isUseBlockUpdate()
Gets the use block update property, which indicates whether blocked update
support will be used.
|
boolean |
isUseDrdaMetadataVersion()
Gets the use DRDA metadata version property, which indicates if the DatabaseMetadata.getVersion
method should return the DRDA metadata.
|
void |
setAccess(java.lang.String access)
Sets the level of database access for the connection.
|
void |
setAffinityFailbackInterval(int setting)
Sets the affinity failback interval
|
void |
setAutoCommit(boolean value)
Sets whether auto-commit mode is the default connection mode for new connections.
|
void |
setAutocommitException(boolean value)
Sets whether commit or rollback throws SQLException when autocommit is enabled.
|
void |
setBehaviorOverride(int behaviors)
Sets the Toolbox JDBC Driver behaviors to override.
|
void |
setBidiImplicitReordering(boolean value)
Sets whether bidi implicit reordering is used.
|
void |
setBidiNumericOrdering(boolean value)
Sets whether bidi numeric ordering round trip is used.
|
void |
setBidiStringType(int bidiStringType)
Sets the output string type of bidi data.
|
void |
setBigDecimal(boolean value)
Sets whether a big decimal value is returned.
|
void |
setBlockCriteria(int blockCriteria)
Sets the criteria for retrieving data from the IBM i system in
blocks of records.
|
void |
setBlockSize(int blockSize)
Sets the block size in kilobytes to retrieve from the IBM i system and
cache on the client.
|
void |
setCharacterTruncation(java.lang.String setting)
Sets the character truncation property, which indicates how
the driver should handle character truncation errors.
|
void |
setClientRerouteAlternatePortNumber(java.lang.String alternatePortNumber)
Sets the client reroute alternate server name.
|
void |
setClientRerouteAlternateServerName(java.lang.String alternateServerName)
Sets the client reroute alternate server name.
|
void |
setConcurrentAccessResolution(int concurrentAccessResolution)
This method sets concurrent access resolution.
|
void |
setCursorHold(boolean cursorHold)
Sets whether the cursor is held.
|
void |
setCursorSensitivity(java.lang.String cursorSensitivity)
Sets the cursor sensitivity to be requested from the database.
|
void |
setDatabaseName(java.lang.String databaseName)
Sets the databaseName property.
|
void |
setDataCompression(boolean compression)
Sets whether to use data compression.
|
void |
setDataSourceName(java.lang.String dataSourceName)
Sets the dataSourceName property.
|
void |
setDataTruncation(boolean truncation)
Sets whether to use data truncation.
|
void |
setDateFormat(java.lang.String dateFormat)
Sets the date format used in date literals within SQL statements.
|
void |
setDateSeparator(java.lang.String dateSeparator)
Sets the date separator used in date literals within SQL statements.
|
void |
setDecfloatRoundingMode(java.lang.String decfloatRoundingMode)
Sets the decfloat rounding mode.
|
void |
setDecimalDataErrors(java.lang.String setting)
Sets the decimal data errors setting
|
void |
setDecimalSeparator(java.lang.String decimalSeparator)
Sets the decimal separator used in numeric literals within SQL
statements.
|
void |
setDescribeOption(java.lang.String option)
Sets the describe option.
|
void |
setDescription(java.lang.String description)
Sets the data source description.
|
void |
setDriver(java.lang.String driver)
Sets the JDBC driver implementation.
|
void |
setEnableClientAffinitiesList(int setting)
Sets the enable client afflinities list
|
void |
setEnableSeamlessFailover(int setting)
Sets the enable seamless failover property
|
void |
setErrors(java.lang.String errors)
Sets the amount of detail to be returned in the message for errors
occurring on the IBM i system.
|
void |
setExtendedDynamic(boolean extendedDynamic)
Sets whether to use extended dynamic support.
|
void |
setExtendedMetadata(boolean extendedMetaData)
Sets whether the driver should request extended metadata from the
IBM i system.
|
void |
setExtendedMetaData(boolean extendedMetaData)
Sets whether the driver should request extended metadata from the
IBM i system.
|
void |
setFullOpen(boolean fullOpen)
Sets whether to fully open a file when performing a query.
|
void |
setHoldInputLocators(boolean hold)
Sets the "hold input locators" property
|
void |
setHoldStatements(boolean hold)
Sets the "hold statements" property
|
void |
setIgnoreWarnings(java.lang.String ignoreWarnings)
Sets the ignore warnings property.
|
void |
setJvm16Synchronize(boolean value)
Indicates whether the temporary fix for JVM 1.6 is enabled.
|
void |
setKeepAlive(boolean keepAlive)
Turns on the socket 'keepAlive' property.
|
void |
setLazyClose(boolean lazyClose)
Sets whether to delay closing cursors until subsequent requests.
|
void |
setLibraries(java.lang.String libraries)
Sets the libraries to add to the server job's library list.
|
void |
setLobThreshold(int threshold)
Sets the maximum LOB (large object) size in bytes that
can be retrieved as part of a result set.
|
void |
setLoginTimeout(int timeout)
Sets the maximum time in seconds that this data source can wait while attempting to connect to a database.
|
void |
setLogWriter(java.io.PrintWriter writer)
Sets the log writer for this data source.
|
void |
setMaximumBlockedInputRows(int maximumBlockedInputRows)
Sets the maximum blocked input rows.
|
void |
setMaximumPrecision(int precision)
Sets the maximum precision property.
|
void |
setMaximumScale(int scale)
Sets the maximum scale property.
|
void |
setMaxRetriesForClientReroute(int setting)
Sets the maxRetriesForClientReroute.
|
void |
setMetadataSource(int mds)
Sets how to retrieve DatabaseMetaData.
|
void |
setMetaDataSource(int mds)
Sets how to retrieve DatabaseMetaData.
|
void |
setMinimumDivideScale(int scale)
Sets the minimum divide scale property.
|
void |
setNaming(java.lang.String naming)
Sets the naming convention used when referring to tables.
|
void |
setNumericRangeError(java.lang.String setting)
Sets the numeric range error property, which indicates how
the driver should handle numberic range errors.
|
void |
setPackage(java.lang.String packageName)
Sets the base name of the SQL package.
|
void |
setPackageAdd(boolean add)
Sets whether to add newly prepared statements to the SQL package
specified on the "package" property.
|
void |
setPackageCache(boolean cache)
Sets whether to cache a subset of the SQL package information in client memory.
|
void |
setPackageCcsid(int ccsid)
Sets the package CCSID property, which indicates the
CCSID in which statements are sent to the IBM i system and
also the CCSID of the package they are stored in.
|
void |
setPackageCCSID(int ccsid)
Sets the package CCSID property, which indicates the
CCSID in which statements are sent to the IBM i system and
also the CCSID of the package they are stored in.
|
void |
setPackageClear(boolean clear)
Deprecated.
|
void |
setPackageCriteria(java.lang.String packageCriteria)
Sets the type of SQL statement to be stored in the SQL package.
|
void |
setPackageError(java.lang.String packageError)
Sets the action to take when SQL package errors occur.
|
void |
setPackageLibrary(java.lang.String packageLibrary)
Sets the library for the SQL package.
|
void |
setPassword(char[] password)
Sets the 'password' property.
|
void |
setPassword(java.lang.String password)
Sets the 'password' property.
|
void |
setPortNumber(int portNumber)
Sets the portNumber property, which indicates the
port number that should be used when connecting to the server.
|
void |
setPrefetch(boolean prefetch)
Sets whether to prefetch data upon executing a SELECT statement.
|
void |
setPrompt(boolean prompt)
Sets whether the user should be prompted if a user name or password is
needed to connect to the IBM i system.
|
void |
setProperties(java.util.Properties newProperties)
Sets the properties for this datasource.
|
void |
setProperties(java.lang.String propertiesString)
Sets the properties based on ";" delimited string of properties, in same
fashion as URL properties specified with
DriverManager.getConnection(urlProperties).
|
void |
setProxyServer(java.lang.String proxyServer)
Sets the name of the proxy server.
|
void |
setQaqqinilib(java.lang.String libraryName)
Sets the QAQQINI library name.
|
void |
setQaqqiniLibrary(java.lang.String libraryName)
Sets the QAQQINI library name.
|
void |
setQueryOptimizeGoal(int goal)
Sets the "query optimize goal" property
|
void |
setQueryReplaceTruncatedParameter(java.lang.String value)
Sets the query replace truncated parameter property, which set the value
of an input parameter to a query when the parameter is truncated.
|
void |
setQueryStorageLimit(int limit)
Sets the storage limit in megabytes, that should be used for statements executing a query in a connection.
|
void |
setQueryTimeoutMechanism(java.lang.String timeoutMechanism)
Sets the query timeout mechanism property, which indicates how
the toolbox will enforce the query timeout specified on the statement.
|
void |
setReceiveBufferSize(int size)
Sets the socket 'receive buffer size' option to the
specified value.
|
void |
setRemarks(java.lang.String remarks)
Sets the source of the text for REMARKS columns in ResultSets returned
by DatabaseMetaData methods.
|
void |
setRetryIntervalForClientReroute(int setting)
Sets the retryIntervalForClientReroute.
|
void |
setRollbackCursorHold(boolean hold)
Sets the "rollback cursor hold" property
|
void |
setSavePasswordWhenSerialized(boolean savePassword)
Sets whether to save the password locally with the rest of the properties when
this data source object is serialized.
|
void |
setSecondaryUrl(java.lang.String url)
Sets the secondary URL to be used for a connection on the middle-tier's
DriverManager in a multiple tier environment, if it is different than
already specified.
|
void |
setSecondaryURL(java.lang.String url)
Sets the secondary URL to be used for a connection on the middle-tier's
DriverManager in a multiple tier environment, if it is different than
already specified.
|
void |
setSecure(boolean secure)
Sets whether a Secure Socket Layer (SSL) connection is used to communicate
with the IBM i system.
|
void |
setSecureCurrentUser(boolean secureCurrentUser)
Sets whether to disallow "" and *current as user name and password.
|
void |
setSendBufferSize(int size)
Sets the socket 'send buffer size' option to the
specified value.
|
void |
setServerName(java.lang.String serverName)
Sets the serverName property.
|
void |
setServerTrace(int traceCategories)
Enables tracing of the JDBC server job.
|
void |
setServerTraceCategories(int traceCategories)
Enables tracing of the JDBC server job.
|
void |
setSocketTimeout(int milliseconds)
This property enables/disables socket timeout with the
specified value in milliseconds.
|
void |
setSoLinger(long milliseconds)
Sets the socket 'linger' property to the
specified linger time in milliseconds.
|
void |
setSort(java.lang.String sort)
Sets how the IBM i system sorts records before sending them to the client.
|
void |
setSortLanguage(java.lang.String language)
Sets the three-character language id to use for selection of a sort sequence.
|
void |
setSortTable(java.lang.String table)
Sets the library and file name of a sort sequence table stored on the
IBM i system.
|
void |
setSortWeight(java.lang.String sortWeight)
Sets how the IBM i system treats case while sorting records.
|
void |
setSoTimeout(long milliseconds)
Enables/disables socket timeout with the
specified value in milliseconds.
|
void |
setTcpNoDelay(boolean noDelay)
Sets the socket 'TCP no delay' option.
|
void |
setThreadUsed(boolean threadUsed)
Sets whether a thread is used.
|
void |
setTimeFormat(java.lang.String timeFormat)
Sets the time format used in time literals with SQL statements.
|
void |
setTimeSeparator(java.lang.String timeSeparator)
Sets the time separator used in time literals within SQL statements.
|
void |
setTimestampFormat(java.lang.String timestampFormat)
Sets the timestamp format used by getString.
|
void |
setToolboxTrace(java.lang.String traceCategory)
Sets the toolbox trace category, which indicates
what trace points and diagnostic messages should be logged.
|
void |
setToolboxTraceCategory(java.lang.String traceCategory)
Sets the toolbox trace category, which indicates
what trace points and diagnostic messages should be logged.
|
void |
setTrace(boolean trace)
Sets whether trace messages should be logged.
|
void |
setTransactionIsolation(java.lang.String transactionIsolation)
Sets the IBM i system's transaction isolation.
|
void |
setTranslateBinary(boolean translate)
Sets whether binary data is translated.
|
void |
setTranslateBoolean(boolean translate)
Sets how Boolean objects are interpreted when setting the value
for a character field/parameter using the PreparedStatement.setObject(),
CallableStatement.setObject() or ResultSet.updateObject() methods.
|
void |
setTranslateHex(java.lang.String parseOption)
Sets the translate hex property, which indicates how
the parser will treat hexadecimal literals.
|
void |
setTrueAutocommit(boolean value)
Sets whether true auto commit support is used.
|
void |
setTrueAutoCommit(boolean value)
Sets whether true auto commit support is used.
|
void |
setUseBlockUpdate(boolean option)
Sets the use block update property, which indicates whether
blocked update support will be used.
|
void |
setUseDrdaMetadataVersion(boolean option)
Sets the use drda metadata version property, which indicates whether
the drda metadata version should be returned DatabaseMetadata.getVersion.
|
void |
setUser(java.lang.String user)
Sets the 'user' property.
|
void |
setVariableFieldCompression(java.lang.String option)
Sets the variable field compression property.
|
void |
setXALooselyCoupledSupport(int lcs)
Sets whether lock sharing is allowed for loosely coupled transaction branches.
|
java.lang.String |
toString()
Returns the string representation of the object.
|
public static final int MAX_STORAGE_LIMIT
public static final int SERVER_TRACE_START_DATABASE_MONITOR
public static final int SERVER_TRACE_DEBUG_SERVER_JOB
public static final int SERVER_TRACE_SAVE_SERVER_JOBLOG
public static final int SERVER_TRACE_TRACE_SERVER_JOB
public static final int SERVER_TRACE_SAVE_SQL_INFORMATION
public AS400JDBCManagedDataSource()
public AS400JDBCManagedDataSource(java.lang.String serverName)
serverName
- The name of the IBM i system.public AS400JDBCManagedDataSource(java.lang.String serverName, java.lang.String user, java.lang.String password)
serverName
- The name of the IBM i system.user
- The user id.password
- The user password.public AS400JDBCManagedDataSource(java.lang.String serverName, java.lang.String user, char[] password)
serverName
- The name of the IBM i system.user
- The user id.password
- The user password.public AS400JDBCManagedDataSource(java.lang.String serverName, java.lang.String user, java.lang.String password, java.lang.String keyRingName, java.lang.String keyRingPassword)
serverName
- The name of the system.user
- The user id.password
- The user password.keyRingName
- Not used.keyRingPassword
- Not used.public boolean checkPoolHealth(boolean logStatistics)
Note: This method is provided for use as a diagnostic tool only. It temporarily "freezes" the connection pool while it collects statistics and examines the pool state.
logStatistics
- If true, additional information is logged.public java.lang.Object clone()
clone
in class java.lang.Object
public void closePool()
public java.lang.String getAccess()
public int getBehaviorOverride()
The return value is a combination of the following:
public int getBidiStringType()
public int getBlockCriteria()
Valid values include:
public int getBlockSize()
Valid values include:
public java.lang.String getCharacterTruncation()
Value values are:
public int getConcurrentAccessResolution()
AS400JDBCDataSource.CONCURRENTACCESS_NOT_SET
,
AS400JDBCDataSource.CONCURRENTACCESS_USE_CURRENTLY_COMMITTED
,
AS400JDBCDataSource.CONCURRENTACCESS_WAIT_FOR_OUTCOME
and
AS400JDBCDataSource.CONCURRENTACCESS_SKIP_LOCKS
,
with the property defaulting to AS400JDBCDataSource.CONCURRENTACCESS_NOT_SET
.
Setting this property to default exhibits the default behavior on the servers
i.e., the semantic applied for read
transactions to avoid locks will be determined by the server.
AS400JDBCDataSource.CONCURRENTACCESS_USE_CURRENTLY_COMMITTED
specifies that driver will flow USE CURRENTLY COMMITTED
to server. Whether CURRENTLY COMMITTED will actually be in effect is
ultimately determined by server.
AS400JDBCDataSource.CONCURRENTACCESS_WAIT_FOR_OUTCOME
specifies that driver will flow WAIT FOR OUTCOME
to server. This will disable the CURRENTLY COMMITTED behavior at the server,
if enabled, and the server will wait for the commit or rollback of data in the process of
being updated.
AS400JDBCDataSource.CONCURRENTACCESS_SKIP_LOCKS
specifies that driver will flow SKIP LOCKS
to server. This directs the database manager to skip records in the case of record lock conflicts.AS400JDBCDataSource.CONCURRENTACCESS_NOT_SET
,
AS400JDBCDataSource.CONCURRENTACCESS_USE_CURRENTLY_COMMITTED
,
AS400JDBCDataSource.CONCURRENTACCESS_WAIT_FOR_OUTCOME
, or
AS400JDBCDataSource.CONCURRENTACCESS_SKIP_LOCKS
public java.sql.Connection getConnection() throws java.sql.SQLException
setDataSourceName()
, this method will return a pooled connection.
Otherwise it will return a non-pooled connection.
If pooling, the very first call to one of the getConnection() methods for this class will create and initialize the connection pool,
and may have slow response. Therefore it is advisable for the application to make an initial "dummy" call to getConnection().
If the connection pool is at or near capacity, a non-pooled connection may be returned.
It is the responsibility of the caller to ultimately call Connection.close() to release the connection, even if the connection has become unusable.
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
- If a database error occurs.setDataSourceName(java.lang.String)
public java.sql.Connection getConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException
setDataSourceName()
, this method will return a pooled connection. Otherwise it will return a non-pooled connection.
If pooling, the very first call to one of the getConnection() methods for this class will create and initialize the connection pool, and may have slow response. Therefore it is advisable for the application to make an initial "dummy" call to getConnection().
If the connection pool is at or near capacity, a non-pooled connection may be returned.
It is the responsibility of the caller to ultimately call Connection.close() to release the connection, even if the connection has become unusable.
getConnection
in interface javax.sql.DataSource
user
- The database user.password
- The database password.java.sql.SQLException
- If a database error occurs.setDataSourceName(java.lang.String)
public java.sql.Connection getConnection(java.lang.String user, char[] password) throws java.sql.SQLException
setDataSourceName()
, this method will return a pooled connection. Otherwise it will return a non-pooled connection.
If pooling, the very first call to one of the getConnection() methods for this class will create and initialize the connection pool, and may have slow response. Therefore it is advisable for the application to make an initial "dummy" call to getConnection().
If the connection pool is at or near capacity, a non-pooled connection may be returned.
It is the responsibility of the caller to ultimately call Connection.close() to release the connection, even if the connection has become unusable.
user
- The database user.password
- The database password.java.sql.SQLException
- If a database error occurs.setDataSourceName(java.lang.String)
public java.lang.String getCursorSensitivity()
Valid values include:
public java.lang.String getDatabaseName()
public java.lang.String getDataSourceName()
public java.lang.String getDateFormat()
Valid values include:
public java.lang.String getDateSeparator()
Valid values include:
public java.lang.String getDecfloatRoundingMode()
Valid values include:
public java.lang.String getDecimalDataErrors()
public java.lang.String getDecimalSeparator()
Valid values include:
public java.lang.String getIgnoreWarnings()
public java.lang.String getDescription()
public java.lang.String getDescribeOption()
public java.lang.String getDriver()
Valid values include:
public java.lang.String getErrors()
public java.lang.String getLibraries()
public int getLobThreshold()
public int getLoginTimeout()
getLoginTimeout
in interface javax.sql.CommonDataSource
public java.io.PrintWriter getLogWriter() throws java.sql.SQLException
getLogWriter
in interface javax.sql.CommonDataSource
java.sql.SQLException
- If a database error occurs.public int getMetaDataSource()
public int getMetadataSource()
public java.lang.String getNaming()
public java.lang.String getNumericRangeError()
Value values are:
public java.lang.String getPackage()
public java.lang.String getPackageCriteria()
public java.lang.String getPackageError()
public java.lang.String getPackageLibrary()
public java.lang.String getProxyServer()
public int getQueryOptimizeGoal()
Possible values include:
public java.lang.String getQueryReplaceTruncatedParameter()
Valid values include:
public java.lang.String getQueryTimeoutMechanism()
Valid values include:
public int getQueryStorageLimit()
Valid values are -1 to MAX_STORAGE_LIMIT megabytes. The default value is -1 meaning there is no limit.
public javax.naming.Reference getReference() throws javax.naming.NamingException
getReference
in interface javax.naming.Referenceable
javax.naming.NamingException
- If a naming error occurs in resolving the object.public java.lang.String getRemarks()
public java.lang.String getSecondaryUrl()
public java.lang.String getSecondaryURL()
public java.lang.String getServerName()
public int getServerTraceCategories()
dataSource.setServerTraceCategories(AS400JDBCManagedDataSource.SERVER_TRACE_START_DATABASE_MONITOR + AS400JDBCManagedDataSource.SERVER_TRACE_SAVE_SERVER_JOBLOG);
The value is a combination of the following:
Tracing the JDBC server job will use significant amounts of system resources. Additional processor resource is used to collect the data, and additional storage is used to save the data. Turn on tracing only to debug a problem as directed by IBM service.
public int getServerTrace()
dataSource.setServerTraceCategories(AS400JDBCManagedDataSource.SERVER_TRACE_START_DATABASE_MONITOR + AS400JDBCManagedDataSource.SERVER_TRACE_SAVE_SERVER_JOBLOG);
The value is a combination of the following:
Tracing the JDBC server job will use significant amounts of system resources. Additional processor resource is used to collect the data, and additional storage is used to save the data. Turn on tracing only to debug a problem as directed by IBM service. Note: this method is the same as getServerTraceCategories() so that it corresponds to the connection property name
public long getSocketTimeout()
public java.lang.String getSort()
Valid values include:
public java.lang.String getSortLanguage()
public java.lang.String getSortTable()
public java.lang.String getSortWeight()
public java.lang.String getTimeFormat()
Valid values include:
public java.lang.String getTimeSeparator()
Valid values include:
public java.lang.String getTimestampFormat()
Valid values include:
public java.lang.String getTransactionIsolation()
Valid values include:
public int getPortNumber()
public java.lang.String getQaqqiniLibrary()
public java.lang.String getQaqqinilib()
public int getEnableClientAffinitiesList()
public void setEnableClientAffinitiesList(int setting)
setting
- The setting to use for the connection.public int getAffinityFailbackInterval()
public void setAffinityFailbackInterval(int setting)
setting
- The setting to use for the connection.public java.lang.String getClientRerouteAlternateServerName()
public void setClientRerouteAlternateServerName(java.lang.String alternateServerName)
public java.lang.String getClientRerouteAlternatePortNumber()
public void setClientRerouteAlternatePortNumber(java.lang.String alternatePortNumber)
public int getMaxRetriesForClientReroute()
public void setMaxRetriesForClientReroute(int setting)
setting
- The setting to use for the connection.public int getRetryIntervalForClientReroute()
public void setRetryIntervalForClientReroute(int setting)
setting
- The setting to use for the connection.public void setEnableSeamlessFailover(int setting)
setting
- The setting to use for the connection.public int getEnableSeamlessFailover()
public java.lang.String getUser()
public int getXALooselyCoupledSupport()
Possible values include:
public void invalidate(java.lang.String user, java.lang.String password)
user
- The database user.password
- The database password.public boolean isAutoCommit()
public boolean isAutocommitException()
public boolean isBidiImplicitReordering()
public boolean isBidiNumericOrdering()
public boolean isBigDecimal()
public boolean isCursorHold()
public boolean isDataCompression()
public boolean isDataTruncation()
public boolean isExtendedDynamic()
public boolean isExtendedMetaData()
public boolean isExtendedMetadata()
public boolean isFullOpen()
public boolean isHoldInputLocators()
public boolean isHoldStatements()
public boolean isJvm16Synchronize()
public boolean isLazyClose()
public boolean isPackageAdd()
public boolean isPackageCache()
public boolean isPackageClear()
public boolean isPrefetch()
public boolean isPrompt()
public boolean isRollbackCursorHold()
public boolean isSavePasswordWhenSerialized()
If the password is saved, it is up to the application to protect the serialized form of the object because it contains all necessary information to connect to the IBM i system. The default is false. It is a security risk to save the password with the rest of the properties so by default the password is not saved. If the programmer chooses to accept this risk, call setSavePasswordWhenSerialized(true) to force the Toolbox to save the password with the other properties when the data source object is serialized.
public boolean isSecure()
public boolean isSecureCurrentUser()
public boolean isThreadUsed()
public boolean isTrace()
public boolean isTranslateBinary()
public boolean isTranslateBoolean()
public boolean isTrueAutoCommit()
public boolean isTrueAutocommit()
public void setAccess(java.lang.String access)
access
- The access level.
Valid values include:
public void setAutoCommit(boolean value)
value
- The default value is true.public void setAutocommitException(boolean value)
value
- The default value is false.public void setTrueAutoCommit(boolean value)
value
- true if true auto commit support should be used; false otherwise.
The default value is false.public void setTrueAutocommit(boolean value)
value
- true if true auto commit support should be used; false otherwise.
The default value is false.
Note: this method is the same as setTrueAutoCommit() so that it corresponds to the connection property nameproperty namepublic void setBehaviorOverride(int behaviors)
behaviors
- The driver behaviors to override.
Valid values include:
public void setBidiStringType(int bidiStringType)
bidiStringType
- output bidi string typepublic void setBidiImplicitReordering(boolean value)
value
- true if implicit reordering should be used; false otherwise.
The default value is true.public void setBidiNumericOrdering(boolean value)
value
- true if numeric ordering round trip should be used; false otherwise.
The default value is false.public void setBigDecimal(boolean value)
value
- true if a big decimal is returned; false otherwise.
The default value is true.public void setBlockCriteria(int blockCriteria)
blockCriteria
- The block criteria.
Valid values include:
public void setBlockSize(int blockSize)
blockSize
- The block size in kilobytes.
Valid values include:
public void setCharacterTruncation(java.lang.String setting)
setting
- The character truncation behavior.
Valid values are:
public void setConcurrentAccessResolution(int concurrentAccessResolution)
AS400JDBCDataSource.CONCURRENTACCESS_NOT_SET
,
AS400JDBCDataSource.CONCURRENTACCESS_USE_CURRENTLY_COMMITTED
,
AS400JDBCDataSource.CONCURRENTACCESS_WAIT_FOR_OUTCOME
and
AS400JDBCDataSource.CONCURRENTACCESS_SKIP_LOCKS
,
with the property defaulting to AS400JDBCDataSource.CONCURRENTACCESS_NOT_SET
.
Setting this property to default exhibits the default behavior on the servers
i.e., the semantic applied for read
transactions to avoid locks will be determined by the server.
AS400JDBCDataSource.CONCURRENTACCESS_USE_CURRENTLY_COMMITTED
specifies that driver will flow USE CURRENTLY COMMITTED
to server. Whether CURRENTLY COMMITTED will actually be in effect is
ultimately determined by server.
AS400JDBCDataSource.CONCURRENTACCESS_WAIT_FOR_OUTCOME
specifies that driver will flow WAIT FOR OUTCOME
to server. This will disable the CURRENTLY COMMITTED behavior at the server,
if enabled, and the server will wait for the commit or rollback of data in the process of
being updated.
AS400JDBCDataSource.CONCURRENTACCESS_SKIP_LOCKS
specifies that driver will flow SKIP LOCKS
to server. This directs the database manager to skip records in the case of record lock conflicts.concurrentAccessResolution
- The current access resolution setting. Possible valuse:
AS400JDBCDataSource.CONCURRENTACCESS_NOT_SET
,
AS400JDBCDataSource.CONCURRENTACCESS_USE_CURRENTLY_COMMITTED
,
AS400JDBCDataSource.CONCURRENTACCESS_WAIT_FOR_OUTCOME
, or
AS400JDBCDataSource.CONCURRENTACCESS_SKIP_LOCKS
public void setCursorSensitivity(java.lang.String cursorSensitivity)
Valid values include:
cursorSensitivity
- cursor sensitivitypublic void setCursorHold(boolean cursorHold)
cursorHold
- true if the cursor is held; false otherwise. The default value is true.public void setDatabaseName(java.lang.String databaseName)
databaseName
- The database name or *SYSBAS.ExtendedIllegalStateException
- If the data source is already in use.public void setDataCompression(boolean compression)
compression
- true if data compression is used; false otherwise.public void setDataSourceName(java.lang.String dataSourceName)
AS400JDBCManagedConnectionPoolDataSource
.
Note: The properties of the specified datasource will override all similarly-named properties of this object. For example, if the specified datasource has a "serverName" property, then that value will be used by getConnection()
, and any value set via setServerName()
will be disregarded.
Note: If a dataSourceName is not specified, the getConnection()
methods will simply return non-pooled connections.
dataSourceName
- The data source name.ExtendedIllegalStateException
- If the data source is already in use.public void setDataTruncation(boolean truncation)
truncation
- true if data truncation is used; false otherwise.public void setDateFormat(java.lang.String dateFormat)
dateFormat
- The date format.
Valid values include:
public void setDateSeparator(java.lang.String dateSeparator)
dateSeparator
- The date separator.
Valid values include:
public void setDecfloatRoundingMode(java.lang.String decfloatRoundingMode)
decfloatRoundingMode
- The decfloat rounding mode.
Valid values include:
public void setDecimalDataErrors(java.lang.String setting)
setting
- The errors setting.public void setDecimalSeparator(java.lang.String decimalSeparator)
decimalSeparator
- The decimal separator.
Valid values include:
public void setDescribeOption(java.lang.String option)
option
- The describe option.public void setIgnoreWarnings(java.lang.String ignoreWarnings)
ignoreWarnings
- Specifies a list of SQL states for which the driver should not create warning objects.public void setDescription(java.lang.String description)
description
- The description.public void setSort(java.lang.String sort)
sort
- The sort value.
Valid values include:
public void setErrors(java.lang.String errors)
errors
- The error message level.
Valid values include: "basic" and "full". The default value is "basic".public void setExtendedDynamic(boolean extendedDynamic)
extendedDynamic
- If extended dynamic support is used; false otherwise.
The default value is not to use extended dynamic support.public void setExtendedMetaData(boolean extendedMetaData)
extendedMetaData
- True to request extended metadata from the system, false otherwise.
The default value is false.public void setExtendedMetadata(boolean extendedMetaData)
extendedMetaData
- True to request extended metadata from the system, false otherwise.
The default value is false.
Note: this method is the same as setExtendedMetaData() so that it corresponds to the connection property namepublic void setFullOpen(boolean fullOpen)
fullOpen
- True to fully open a file (turn off optimizations), false
to allow optimizations. The default value is false.public void setHoldInputLocators(boolean hold)
hold
- True to hold input locators. The default value is true.public void setHoldStatements(boolean hold)
hold
- True to hold statements. The default value is false.public void setJvm16Synchronize(boolean value)
value
- true if JVM 1.6 fix is enabled; false otherwise.
The default value is true.public void setLazyClose(boolean lazyClose)
lazyClose
- true to delay closing cursors until subsequent requests; false otherwise.
The default value is false.public void setLibraries(java.lang.String libraries)
libraries
- The library list.public void setLobThreshold(int threshold)
threshold
- The lob threshold. Valid range is 0-16777216.
The default value is 32768.public void setLoginTimeout(int timeout) throws java.sql.SQLException
setLoginTimeout
in interface javax.sql.CommonDataSource
timeout
- The login timeout in seconds.java.sql.SQLException
public void setLogWriter(java.io.PrintWriter writer) throws java.sql.SQLException
Note: The specified PrintWriter might not be retained when an object is obtained via JNDI, that is, by a call to javax.naming.Context.lookup(). Therefore, use this method only on the DataSource object that is used directly by your application (rather than on the "template" DataSource object that was bound in JNDI).
setLogWriter
in interface javax.sql.CommonDataSource
writer
- The log writer; to disable, set to null.java.sql.SQLException
- If a database error occurs.public void setMetaDataSource(int mds)
mds
- The setting for metadata source
The default value is 1.public void setMetadataSource(int mds)
mds
- The setting for metadata source
The default value is 1.
Note: this method is the same as setMetaDataSource() so that it corresponds to the connection property namepublic void setNaming(java.lang.String naming)
naming
- The naming convention. Valid values include: "sql" (e.g. schema.table)
and "system" (e.g. schema/table). The default value is "sql".public void setPackage(java.lang.String packageName)
packageName
- The base name of the SQL package.public void setPackageAdd(boolean add)
add
- True if newly prepared statements should be added to the SQL package specified on
the "package" property; false otherwise.
The default value is true.public void setPackageCache(boolean cache)
cache
- True if caching is used; false otherwise. The default value is false.public void setPackageClear(boolean clear)
clear
- If the SQL package are cleared when full; false otherwise.public void setPackageCriteria(java.lang.String packageCriteria)
packageCriteria
- The type of SQL statement.
Valid values include: "default" (only store SQL statements with parameter
markers in the package), and "select" (store all SQL SELECT statements
in the package). The default value is "default".public void setPackageError(java.lang.String packageError)
packageError
- The action when SQL errors occur.
Valid values include: "exception", "warning", and "none". The default value is "warning".public void setPackageLibrary(java.lang.String packageLibrary)
packageLibrary
- The SQL package library. The default package library is "QGPL".public void setPassword(java.lang.String password)
password
- The password.public void setPassword(char[] password)
password
- The password.public void setPrefetch(boolean prefetch)
prefetch
- If prefetch is used; false otherwise.
The default value is to prefectch data.public void setPrompt(boolean prompt)
prompt
- true if the user is prompted for signon information; false otherwise.
The default value is false.public void setProperties(java.lang.String propertiesString)
propertiesString
- list of ";" delimited propertiespublic void setProperties(java.util.Properties newProperties)
newProperties
- object containing updated property valuespublic void setProxyServer(java.lang.String proxyServer)
proxyServer
- The proxy server.public void setQueryOptimizeGoal(int goal)
goal
- - the optimization goal
Valid values include:
public void setQueryReplaceTruncatedParameter(java.lang.String value)
value
- The value to use when a parameter is truncated.public void setQueryTimeoutMechanism(java.lang.String timeoutMechanism)
timeoutMechanism
- The timeout mechanism to use.
Valid values include:
public void setQueryStorageLimit(int limit)
limit
- - the storage limit (in megabytes)
Valid values are -1 to MAX_STORAGE_LIMIT megabytes. The default value is -1 meaning there is no limit.
public void setRemarks(java.lang.String remarks)
remarks
- The text source.
Valid values include: "sql" (SQL object comment) and "system" (IBM i object description).
The default value is "system".public void setRollbackCursorHold(boolean hold)
hold
- True to hold cursor across rollbacks. The default value is false.public void setSecondaryUrl(java.lang.String url)
url
- The secondary URL.public void setSecondaryURL(java.lang.String url)
url
- The secondary URL.
Note: this method is the same as setSecondaryUrl() so that it corresponds to the connection property namepublic void setSecure(boolean secure)
secure
- true if Secure Socket Layer connection is used; false otherwise.
The default value is false.ExtendedIllegalStateException
- If the data source was as secure and secure is false.public void setSecureCurrentUser(boolean secureCurrentUser)
secureCurrentUser
- The secure current user setting.public void setServerName(java.lang.String serverName)
serverName
- The system name.ExtendedIllegalStateException
- If the data source is already in use.public void setServerTraceCategories(int traceCategories)
Trace data is collected in spooled files on the system. Multiple levels of tracing can be turned on in combination by adding the constants and passing that sum on the set method. For example,
dataSource.setServerTraceCategories(AS400JDBCManagedDataSource.SERVER_TRACE_START_DATABASE_MONITOR + AS400JDBCManagedDataSource.SERVER_TRACE_SAVE_SERVER_JOBLOG);
traceCategories
- level of tracing to start.
Valid values include:
Tracing the JDBC server job will use significant amounts of system resources. Additional processor resource is used to collect the data, and additional storage is used to save the data. Turn on tracing only to debug a problem as directed by IBM service.
public void setServerTrace(int traceCategories)
Trace data is collected in spooled files on the system. Multiple levels of tracing can be turned on in combination by adding the constants and passing that sum on the set method. For example,
dataSource.setServerTraceCategories(AS400JDBCManagedDataSource.SERVER_TRACE_START_DATABASE_MONITOR + AS400JDBCManagedDataSource.SERVER_TRACE_SAVE_SERVER_JOBLOG);
traceCategories
- level of tracing to start.
Valid values include:
Tracing the JDBC server job will use significant amounts of system resources. Additional processor resource is used to collect the data, and additional storage is used to save the data. Turn on tracing only to debug a problem as directed by IBM service. Note: this method is the same as setServerTraceCategories() so that it corresponds to the connection property name
public void setDriver(java.lang.String driver)
Valid values include:
driver
- public void setSavePasswordWhenSerialized(boolean savePassword)
If the password is saved, it is up to the application to protect the serialized form of the object because it contains all necessary information to connect to the IBM i system. The default is false. It is a security risk to save the password with the rest of the properties so by default the password is not saved. If the application programmer chooses to accept this risk, set this property to true to force the Toolbox to save the password with the other properties when the data source object is serialized.
savePassword
- true if the password is saved; false otherwise.
The default value is falsepublic void setSocketTimeout(int milliseconds)
milliseconds
- The socket timeout option value.public void setSortLanguage(java.lang.String language)
language
- The three-character language id.
The default value is ENU.public void setSortTable(java.lang.String table)
table
- The qualified sort table name.public void setSortWeight(java.lang.String sortWeight)
sortWeight
- The sort weight.
Valid values include: "shared" (upper- and lower-case characters are sorted as the
same character) and "unique" (upper- and lower-case characters are sorted as
different characters). The default value is "shared".public void setThreadUsed(boolean threadUsed)
threadUsed
- true if a thread is used; false otherwise.
The default value is true.public void setTimeFormat(java.lang.String timeFormat)
timeFormat
- The time format.
Valid values include:
public void setTimeSeparator(java.lang.String timeSeparator)
timeSeparator
- The time separator.
Valid values include:
public void setTimestampFormat(java.lang.String timestampFormat)
timestampFormat
- The timestamp format.
Valid values include:
public void setTrace(boolean trace)
trace
- true if trace message are logged; false otherwise.
The default value is false.public void setTransactionIsolation(java.lang.String transactionIsolation)
transactionIsolation
- The transaction isolation level.
Valid values include:
public void setTranslateBinary(boolean translate)
translate
- true if binary data is translated; false otherwise.
The default value is false.public void setTranslateBoolean(boolean translate)
translate
- if boolean data is translated; false otherwise.
The default value is true.public void setUser(java.lang.String user)
user
- The user.ExtendedIllegalStateException
- If the data source is already in use.public void setXALooselyCoupledSupport(int lcs)
lcs
- - the "XA loosely coupled support" setting
Valid values include:
public boolean isKeepAlive()
public int getReceiveBufferSize()
public int getSendBufferSize()
public long getSoLinger()
public long getSoTimeout()
public boolean isTcpNoDelay()
public void setKeepAlive(boolean keepAlive)
keepAlive
- The keepalive option value.public void setNumericRangeError(java.lang.String setting)
setting
- The numeric range error behavior.
Valid values are:
public void setReceiveBufferSize(int size)
size
- The receive buffer size option value.public void setSendBufferSize(int size)
size
- The send buffer size option value.public void setSoLinger(long milliseconds)
milliseconds
- The linger option value.public void setSoTimeout(long milliseconds)
milliseconds
- The timeout option value.public void setTcpNoDelay(boolean noDelay)
noDelay
- The TCP no delay option value.public int getPackageCCSID()
public int getPackageCcsid()
public void setPackageCCSID(int ccsid)
ccsid
- The package CCSID.public void setPackageCcsid(int ccsid)
ccsid
- The package CCSID.
Note: this method is the same as setPackageCCSID() so that it corresponds to the connection property namepublic void setPortNumber(int portNumber)
portNumber
- public int getMinimumDivideScale()
public int getMaximumBlockedInputRows()
public int getMaximumPrecision()
public int getMaximumScale()
public void setMinimumDivideScale(int scale)
scale
- The minimum divide scale.public void setMaximumBlockedInputRows(int maximumBlockedInputRows)
maximumBlockedInputRows
- The maximum number of input rowspublic void setMaximumPrecision(int precision)
precision
- The maximum precision.public void setMaximumScale(int scale)
scale
- The maximum scale.public java.lang.String getTranslateHex()
Valid values include:
public void setTranslateHex(java.lang.String parseOption)
parseOption
- The hex constant parser option.
Valid values include:
public boolean isUseBlockUpdate()
public boolean isUseDrdaMetadataVersion()
public void setUseBlockUpdate(boolean option)
option
- The use block update option.public void setUseDrdaMetadataVersion(boolean option)
option
- The use drda metadata version option.public java.lang.String getVariableFieldCompression()
public void setVariableFieldCompression(java.lang.String option)
option
- The variable field compression setting.public void setQaqqiniLibrary(java.lang.String libraryName)
libraryName
- The QAQQINI library name.public void setQaqqinilib(java.lang.String libraryName)
libraryName
- The QAQQINI library name.
Note: this method is the same as setQaqqiniLibrary() so that it corresponds to the connection property namepublic java.lang.String getToolboxTraceCategory()
Valid values include:
public java.lang.String getToolboxTrace()
Valid values include:
public void setToolboxTraceCategory(java.lang.String traceCategory)
traceCategory
- The category option.
Valid values include:
public void setToolboxTrace(java.lang.String traceCategory)
traceCategory
- The category option.
Valid values include:
public java.lang.String toString()
toString
in class java.lang.Object
protected java.lang.String[] getValidWrappedList()