com.ibm.as400.access

Class AS400JDBCManagedDataSource

  • java.lang.Object
    • com.ibm.as400.access.AS400JDBCManagedDataSource
  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.sql.Wrapper, javax.naming.Referenceable, javax.sql.CommonDataSource, javax.sql.DataSource
    Direct Known Subclasses:
    AS400JDBCManagedConnectionPoolDataSource


    public class AS400JDBCManagedDataSource
    extends java.lang.Object
    implements javax.sql.DataSource, javax.naming.Referenceable, java.io.Serializable, java.lang.Cloneable
    This implementation of javax.sql.DataSource can be used to produce Connection objects that will automatically participate in connection pooling, and are managed by the Toolbox's built-in connection pooling manager.

    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.

    See Also:
    AS400JDBCManagedConnectionPoolDataSource, AS400JDBCDataSource, AS400JDBCConnectionPoolDataSource, AS400JDBCXADataSource, Serialized Form
    • Constructor Summary

      Constructors 
      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.  
    • Method Summary

      Methods 
      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.
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.sql.Wrapper

        isWrapperFor, unwrap
    • Field Detail

      • MAX_STORAGE_LIMIT

        public static final int MAX_STORAGE_LIMIT
        The maximum storage space that can be used to execute a query.
        See Also:
        Constant Field Values
      • SERVER_TRACE_START_DATABASE_MONITOR

        public static final int SERVER_TRACE_START_DATABASE_MONITOR
        Start the database monitor on the JDBC server job. This constant is used when setting the level of tracing for the JDBC server job. The numeric value of this constant is 2.
        See Also:
        Constant Field Values
      • SERVER_TRACE_DEBUG_SERVER_JOB

        public static final int SERVER_TRACE_DEBUG_SERVER_JOB
        Start debug on the JDBC server job. This constant is used when setting the level of tracing for the JDBC server job. The numeric value of this constant is 4.
        See Also:
        Constant Field Values
      • SERVER_TRACE_SAVE_SERVER_JOBLOG

        public static final int SERVER_TRACE_SAVE_SERVER_JOBLOG
        Save the joblog when the JDBC server job ends. This constant is used when setting the level of tracing for the JDBC server job. The numeric value of this constant is 8.
        See Also:
        Constant Field Values
      • SERVER_TRACE_TRACE_SERVER_JOB

        public static final int SERVER_TRACE_TRACE_SERVER_JOB
        Start job trace on the JDBC server job. This constant is used when setting the level of tracing for the JDBC server job. The numeric value of this constant is 16.
        See Also:
        Constant Field Values
      • SERVER_TRACE_SAVE_SQL_INFORMATION

        public static final int SERVER_TRACE_SAVE_SQL_INFORMATION
        Save SQL information. This constant is used when setting the level of tracing for the JDBC server job. The numeric value of this constant is 32.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AS400JDBCManagedDataSource

        public AS400JDBCManagedDataSource()
        Constructs a default AS400JDBCManagedDataSource object.
      • AS400JDBCManagedDataSource

        public AS400JDBCManagedDataSource(java.lang.String serverName)
        Constructs an AS400JDBCManagedDataSource object to the specified serverName.
        Parameters:
        serverName - The name of the IBM i system.
      • AS400JDBCManagedDataSource

        public AS400JDBCManagedDataSource(java.lang.String serverName,
                                  java.lang.String user,
                                  java.lang.String password)
        Deprecated. Use AS400JDBCManagedDataSource(String serverName, String user, char[] password) instead.
        Constructs an AS400JDBCManagedDataSource object with the specified signon information.
        Parameters:
        serverName - The name of the IBM i system.
        user - The user id.
        password - The user password.
      • AS400JDBCManagedDataSource

        public AS400JDBCManagedDataSource(java.lang.String serverName,
                                  java.lang.String user,
                                  char[] password)
        Constructs an AS400JDBCManagedDataSource object with the specified signon information.
        Parameters:
        serverName - The name of the IBM i system.
        user - The user id.
        password - The user password.
      • AS400JDBCManagedDataSource

        public AS400JDBCManagedDataSource(java.lang.String serverName,
                                  java.lang.String user,
                                  java.lang.String password,
                                  java.lang.String keyRingName,
                                  java.lang.String keyRingPassword)
        Deprecated. 
        Constructs an AS400JDBCManagedDataSource object with the specified signon information to use for SSL communications with the IBM i system.
        Parameters:
        serverName - The name of the system.
        user - The user id.
        password - The user password.
        keyRingName - Not used.
        keyRingPassword - Not used.
    • Method Detail

      • checkPoolHealth

        public boolean checkPoolHealth(boolean logStatistics)
        Verifies the health of the connection pool. For example: That the connection counts are consistent with the connection list lengths, and that all the daemons are still running.

        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.

        Parameters:
        logStatistics - If true, additional information is logged.
        Returns:
        true if connection pool exists and appears healthy; false otherwise.
      • clone

        public java.lang.Object clone()
        Method to create a clone of AS400JDBCManagedDataSource. This does a shallow copy, with the exception of JDProperties, which also gets cloned.
        Overrides:
        clone in class java.lang.Object
      • closePool

        public void closePool()
        Shuts down the connection pool in an orderly manner. Closes all connections in the pool.
      • getAccess

        public java.lang.String getAccess()
        Returns the level of database access for the connection.
        Returns:
        The access level. Valid values include: "all" (all SQL statements allowed), "read call" (SELECT and CALL statements allowed), and "read only" (SELECT statements only). The default value is "all".
      • getBehaviorOverride

        public int getBehaviorOverride()
        Returns what behaviors of the Toolbox JDBC driver have been overridden. Multiple behaviors can be overridden in combination by adding the constants and passing that sum on the setBehaviorOverride() method.
        Returns:
        The behaviors that have been overridden.

        The return value is a combination of the following:

        • 1 - Do not throw an exception if Statement.executeQuery() or PreparedStatement.executeQuery() do not return a result set. Instead, return null for the result set.
      • getBidiStringType

        public int getBidiStringType()
        Returns the output string type of bidi data. See BidiStringType for more information and valid values. -1 will be returned if the value has not been set.
        Returns:
        the bidi string type
      • getBlockCriteria

        public int getBlockCriteria()
        Returns the criteria for retrieving data from the system in blocks of records. Specifying a non-zero value for this property will reduce the frequency of communication to the system, and therefore increase performance.
        Returns:
        The block criteria.

        Valid values include:

        • 0 (no record blocking)
        • 1 (block if FOR FETCH ONLY is specified)
        • 2 (block if FOR UPDATE is specified) - The default value.
      • getBlockSize

        public int getBlockSize()
        Returns the block size in kilobytes to retrieve from the IBM i system and cache on the client. This property has no effect unless the block criteria property is non-zero. Larger block sizes reduce the frequency of communication to the system, and therefore may increase performance.
        Returns:
        The block size in kilobytes.

        Valid values include:

        • 0
        • 8
        • 16
        • 32 - The default value.
        • 64
        • 128
        • 256
        • 512
      • getCharacterTruncation

        public java.lang.String getCharacterTruncation()
        Returns the behavior to use when character truncation occurs
        Returns:
        behaviorString

        Value values are:

        • default
        • warning
        • none
      • getConnection

        public java.sql.Connection getConnection()
                                          throws java.sql.SQLException
        Returns a database connection.
        Note: If a dataSourceName has been specified (via 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.

        Specified by:
        getConnection in interface javax.sql.DataSource
        Returns:
        The connection.
        Throws:
        java.sql.SQLException - If a database error occurs.
        See Also:
        setDataSourceName(java.lang.String)
      • getConnection

        public java.sql.Connection getConnection(java.lang.String user,
                                        java.lang.String password)
                                          throws java.sql.SQLException
        Deprecated. Use getConnection(String user, char[] password) instead.
        Returns a database connection using the specified user and password.
        Note: If a dataSourceName has been specified (via 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.

        Specified by:
        getConnection in interface javax.sql.DataSource
        Parameters:
        user - The database user.
        password - The database password.
        Returns:
        The connection
        Throws:
        java.sql.SQLException - If a database error occurs.
        See Also:
        setDataSourceName(java.lang.String)
      • getConnection

        public java.sql.Connection getConnection(java.lang.String user,
                                        char[] password)
                                          throws java.sql.SQLException
        Returns a database connection using the specified user and password.
        Note: If a dataSourceName has been specified (via 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.

        Parameters:
        user - The database user.
        password - The database password.
        Returns:
        The connection
        Throws:
        java.sql.SQLException - If a database error occurs.
        See Also:
        setDataSourceName(java.lang.String)
      • getCursorSensitivity

        public java.lang.String getCursorSensitivity()
        Returns the value of the cursorSensitivity property. If the resultSetType is ResultSet.TYPE_FORWARD_ONLY or ResultSet.TYPE_SCROLL_SENSITIVE, the value of this property will control what cursor sensitivity is requested from the database. If the resultSetType is ResultSet.TYPE_SCROLL_INSENSITIVE, this property will be ignored.
        Returns:
        The cursor sensitivity.

        Valid values include:

        • "asensitive"
        • "insensitive"
        • "sensitive"
        The default is "asensitive". This property is ignored when connecting to systems running V5R1 and earlier versions of OS/400.
      • getDatabaseName

        public java.lang.String getDatabaseName()
        Returns the value of the databaseName property. For more information see the documentation for the setDatabaseName() method in this class.
        Returns:
        The database name.
      • getDataSourceName

        public java.lang.String getDataSourceName()
        Returns the value of the dataSourceName property. This property is used to name an underlying data source when connection pooling is used.
        Returns:
        The data source name.
      • getDateFormat

        public java.lang.String getDateFormat()
        Returns the date format used in date literals within SQL statements.
        Returns:
        The date format.

        Valid values include:

        • "mdy"
        • "dmy"
        • "ymd"
        • "usa"
        • "iso"
        • "eur"
        • "jis"
        • "julian"
        • "" (server job value) - default.
        The default is based on the server job.
      • getDateSeparator

        public java.lang.String getDateSeparator()
        Returns the date separator used in date literals within SQL statements. This property has no effect unless the "data format" property is set to: "julian", "mdy", "dmy", or "ymd".
        Returns:
        The date separator.

        Valid values include:

        • "/" (slash)
        • "-" (dash)
        • "." (period)
        • "," (comma)
        • " " (space)
        • "" (server job value) - default.
        The default value is based on the server job.
      • getDecfloatRoundingMode

        public java.lang.String getDecfloatRoundingMode()
        Returns the decfloat rounding mode.
        Returns:
        The decfloat rounding mode.

        Valid values include:

        • "half even" - default
        • "half up"
        • "down"
        • "ceiling"
        • "floor"
        • "half down"
        • "up"
      • getDecimalDataErrors

        public java.lang.String getDecimalDataErrors()
        Returns the decimal data errors setting.
        Returns:
        The decimal data errors setting.
      • getDecimalSeparator

        public java.lang.String getDecimalSeparator()
        Returns the decimal separator used in numeric literals within SQL statements.
        Returns:
        The decimal separator.

        Valid values include:

        • "." (period)
        • "," (comma)
        • "" (server job value) - default.
        The default value is based on the server job.
      • getIgnoreWarnings

        public java.lang.String getIgnoreWarnings()
        Returns the ignore warnings property. Specifies a list of SQL states for which the driver should not create warning objects.
        Returns:
        The ignore warnings.
      • getDescription

        public java.lang.String getDescription()
        Returns the description of the data source.
        Returns:
        The description.
      • getDescribeOption

        public java.lang.String getDescribeOption()
        Returns the describe option setting.
        Returns:
        The describe option setting.
      • getDriver

        public java.lang.String getDriver()
        Returns the JDBC driver implementation. This property has no effect if the "secondary URL" property is set. This property cannot be set to "native" if the environment is not an IBM i Java Virtual Machine.

        Valid values include:

        • "toolbox" (use the IBM Toolbox for Java JDBC driver)
        • "native" (use the IBM Developer Kit for Java JDBC driver)
        The default value is "toolbox". Note: Not supported in a connection pool.
        Returns:
        the JDBC driver implementation
      • getErrors

        public java.lang.String getErrors()
        Returns the amount of detail for error messages originating from the IBM i system.
        Returns:
        The error message level. Valid values include: "basic" and "full". The default value is "basic".
      • getLibraries

        public java.lang.String getLibraries()
        Returns the libraries to add to the server job's library list. The libraries are delimited by commas or spaces, and "*LIBL" may be used as a place holder for the server job's current library list. The library list is used for resolving unqualified stored procedure calls and finding schemas in DatabaseMetaData catalog methods. If "*LIBL" is not specified, the specified libraries will replace the server job's current library list.
        Returns:
        The library list.
      • getLobThreshold

        public int getLobThreshold()
        Returns the maximum LOB (large object) size in bytes that can be retrieved as part of a result set. LOBs that are larger than this threshold will be retrieved in pieces using extra communication to the IBM i system. Larger LOB thresholds will reduce the frequency of communication to the system, but will download more LOB data, even if it is not used. Smaller LOB thresholds may increase frequency of communication to the system, but will only download LOB data as it is needed.
        Returns:
        The lob threshold. Valid range is 0-16777216. The default value is 32768.
      • getLoginTimeout

        public int getLoginTimeout()
        Returns the timeout value in seconds.
        Note: This value is not used or supported by the Toolbox JDBC driver. Rather, the timeout value is determined by the IBM i system.
        Specified by:
        getLoginTimeout in interface javax.sql.CommonDataSource
        Returns:
        the maximum time in seconds that this data source can wait while attempting to connect to a database.
      • getLogWriter

        public java.io.PrintWriter getLogWriter()
                                         throws java.sql.SQLException
        Returns the log writer for this data source.
        Specified by:
        getLogWriter in interface javax.sql.CommonDataSource
        Returns:
        The log writer for this data source.
        Throws:
        java.sql.SQLException - If a database error occurs.
      • getMetaDataSource

        public int getMetaDataSource()
        Indicates how to retrieve DatabaseMetaData. If set to 0, database metadata will be retrieved through the ROI data flow. If set to 1, database metadata will be retrieved by calling system stored procedures. The methods that currently are available through stored procedures are: getColumnPrivileges
        Returns:
        the metadata setting. The default value is 1.
      • getMetadataSource

        public int getMetadataSource()
        Indicates how to retrieve DatabaseMetaData. If set to 0, database metadata will be retrieved through the ROI data flow. If set to 1, database metadata will be retrieved by calling system stored procedures. The methods that currently are available through stored procedures are: getColumnPrivileges
        Returns:
        the metadata setting. The default value is 1. Note: this method is the same as getMetaDataSource() so that it corresponds to the connection property name
      • getNaming

        public java.lang.String getNaming()
        Returns the naming convention used when referring to tables.
        Returns:
        The naming convention. Valid values include: "sql" (e.g. schema.table) and "system" (e.g. schema/table). The default value is "sql".
      • getNumericRangeError

        public java.lang.String getNumericRangeError()
        Returns the behavior to use when an numeric range error occurs
        Returns:
        behaviorString

        Value values are:

        • default
        • warning
        • none
      • getPackage

        public java.lang.String getPackage()
        Returns the base name of the SQL package. Note that only the first six characters are used to generate the name of the SQL package on the IBM i system. This property has no effect unless the extended dynamic property is set to true. In addition, this property must be set if the extended dynamic property is set to true.
        Returns:
        The base name of the SQL package.
      • getPackageCriteria

        public java.lang.String getPackageCriteria()
        Returns the type of SQL statement to be stored in the SQL package. This can be useful to improve the performance of complex join conditions. This property has no effect unless the extended dynamic property is set to true.
        Returns:
        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".
      • getPackageError

        public java.lang.String getPackageError()
        Returns the action to take when SQL package errors occur. When an SQL package error occurs, the driver will optionally throw an SQLException or post a warning to the Connection, based on the value of this property. This property has no effect unless the extended dynamic property is set to true.
        Returns:
        The action to take when SQL errors occur. Valid values include: "exception", "warning", and "none". The default value is "warning".
      • getPackageLibrary

        public java.lang.String getPackageLibrary()
        Returns the library for the SQL package. This property has no effect unless the extended dynamic property is set to true.
        Returns:
        The SQL package library. The default package library is "QGPL".
      • getProxyServer

        public java.lang.String getProxyServer()
        Returns the name of the proxy server.
        Returns:
        The proxy server.
      • getQueryOptimizeGoal

        public int getQueryOptimizeGoal()
        Returns the "query optimize goal" property
        Returns:
        The optimization goal

        Possible values include:

        • 0 = Optimize query for first block of data (*ALLIO) when extended dynamic packages are used; Optimize query for entire result set (*FIRSTIO) when packages are not used
        • 1 = Optimize query for first block of data (*FIRSTIO)
        • 2 = Optimize query for entire result set (*ALLIO)
      • getQueryReplaceTruncatedParameter

        public java.lang.String getQueryReplaceTruncatedParameter()
        Returns the string to be substituted for a truncated parameter on a query. A empty string means that substitution will not occur.
        Returns:
        the substituted

        Valid values include:

        • "" = No substitution will occur.
        • value = The value to be used when a query parameter is truncated.
        The default value is "".
      • getQueryTimeoutMechanism

        public java.lang.String getQueryTimeoutMechanism()
        Returns the mechanism used to implement query timeout.
        Returns:
        the mechanism used to implement query timeout.

        Valid values include:

        • qqrytimlmt = The QQRYTIMLMT will be used.
        • cancel = A long running statement will be cancelled.
        The default value is 0.
      • getQueryStorageLimit

        public int getQueryStorageLimit()
        Returns the storage limit in megabytes, that should be used for statements executing a query in a connection. Note, this setting is ignored when running to i5/OS V5R4 or earlier

        Valid values are -1 to MAX_STORAGE_LIMIT megabytes. The default value is -1 meaning there is no limit.

        Returns:
        the storage limit
      • getReference

        public javax.naming.Reference getReference()
                                            throws javax.naming.NamingException
        Returns the Reference object for the data source object. This is used by JNDI when bound in a JNDI naming service. Contains the information necessary to reconstruct the data source object when it is later retrieved from JNDI via an object factory.
        Specified by:
        getReference in interface javax.naming.Referenceable
        Returns:
        A Reference object of the data source object.
        Throws:
        javax.naming.NamingException - If a naming error occurs in resolving the object.
      • getRemarks

        public java.lang.String getRemarks()
        Returns the source of the text for REMARKS columns in ResultSets returned by DatabaseMetaData methods.
        Returns:
        The text source. Valid values include: "sql" (SQL object comment) and "system" (IBM i object description). The default value is "system".
      • getSecondaryUrl

        public java.lang.String getSecondaryUrl()
        Returns the secondary URL.
        Returns:
        The secondary URL.
      • getSecondaryURL

        public java.lang.String getSecondaryURL()
        Returns the secondary URL.
        Returns:
        The secondary URL. Note: this method is the same as setSecondaryUrl() so that it corresponds to the connection property name
      • getServerName

        public java.lang.String getServerName()
        Returns the value of the serverName property.
        Returns:
        The system name.
      • getServerTraceCategories

        public int getServerTraceCategories()
        Returns the level of tracing started on the JDBC server job. If tracing is enabled, tracing is started when the client connects to the IBM i system and ends when the connection is disconnected. Tracing must be started before connecting to the system since the client enables tracing only at connect time. 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);
           
        Returns:
        The tracing level.

        The value is a combination of the following:

        • SERVER_TRACE_START_DATABASE_MONITOR - Start the database monitor on the JDBC server job. The numeric value of this constant is 2.
        • SERVER_TRACE_DEBUG_SERVER_JOB - Start debug on the JDBC server job. The numeric value of this constant is 4.
        • SERVER_TRACE_SAVE_SERVER_JOBLOG - Save the joblog when the JDBC server job ends. The numeric value of this constant is 8.
        • SERVER_TRACE_TRACE_SERVER_JOB - Start job trace on the JDBC server job. The numeric value of this constant is 16.
        • SERVER_TRACE_SAVE_SQL_INFORMATION - Save SQL information. The numeric value of this constant is 32.

        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.

      • getServerTrace

        public int getServerTrace()
        Returns the level of tracing started on the JDBC server job. If tracing is enabled, tracing is started when the client connects to the IBM i system and ends when the connection is disconnected. Tracing must be started before connecting to the system since the client enables tracing only at connect time. 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);
           
        Returns:
        The tracing level.

        The value is a combination of the following:

        • SERVER_TRACE_START_DATABASE_MONITOR - Start the database monitor on the JDBC server job. The numeric value of this constant is 2.
        • SERVER_TRACE_DEBUG_SERVER_JOB - Start debug on the JDBC server job. The numeric value of this constant is 4.
        • SERVER_TRACE_SAVE_SERVER_JOBLOG - Save the joblog when the JDBC server job ends. The numeric value of this constant is 8.
        • SERVER_TRACE_TRACE_SERVER_JOB - Start job trace on the JDBC server job. The numeric value of this constant is 16.
        • SERVER_TRACE_SAVE_SQL_INFORMATION - Save SQL information. The numeric value of this constant is 32.

        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

      • getSocketTimeout

        public long getSocketTimeout()
        Gets the socket timeout option in milliseconds.
        Returns:
        The value of the socket timeout option.
      • getSort

        public java.lang.String getSort()
        Returns how the IBM i system sorts records before sending them to the client.
        Returns:
        The sort value.

        Valid values include:

        • "hex" (base the sort on hexadecimal values)
        • "language" (base the sort on the language set in the sort language property)
        • "table" (base the sort on the sort sequence table set in the sort table property)
        The default value is "hex".
      • getSortLanguage

        public java.lang.String getSortLanguage()
        Returns the three-character language id to use for selection of a sort sequence.
        Returns:
        The three-character language id. The default value is ENU.
      • getSortTable

        public java.lang.String getSortTable()
        Returns the library and file name of a sort sequence table stored on the IBM i system.
        Returns:
        The qualified sort table name.
      • getSortWeight

        public java.lang.String getSortWeight()
        Returns how the IBM i system treats case while sorting records.
        Returns:
        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".
      • getTimeFormat

        public java.lang.String getTimeFormat()
        Returns the time format used in time literals with SQL statements.
        Returns:
        The time format.

        Valid values include:

        • "hms"
        • "usa"
        • "iso"
        • "eur"
        • "jis"
        • "" (server job value) - default.
        The default value is based on the server job.
      • getTimeSeparator

        public java.lang.String getTimeSeparator()
        Returns the time separator used in time literals within SQL statements.
        Returns:
        The time separator.

        Valid values include:

        • ":" (colon)
        • "." (period)
        • "," (comma)
        • " " (space)
        • "" (server job value) - default.
        The default value is based on the server job.
      • getTimestampFormat

        public java.lang.String getTimestampFormat()
        Returns the timestamp format used by getString.
        Returns:
        The timestamp format.

        Valid values include:

        • "iso"
        • "ibmsql"
      • getTransactionIsolation

        public java.lang.String getTransactionIsolation()
        Returns the IBM i system's transaction isolation.
        Returns:
        The transaction isolation level.

        Valid values include:

        • "none"
        • "read uncommitted" - The default value.
        • "read committed"
        • "repeatable read"
        • "serializable"
      • getPortNumber

        public int getPortNumber()
        Returns the port number.
        Returns:
        The port number.
      • getQaqqiniLibrary

        public java.lang.String getQaqqiniLibrary()
        Returns the QAQQINI library name.
        Returns:
        The QAQQINI library name.
      • getQaqqinilib

        public java.lang.String getQaqqinilib()
        Returns the QAQQINI library name.
        Returns:
        The QAQQINI library name. Note: this method is the same as getQaqqiniLibrary() so that it corresponds to the connection property name
      • getEnableClientAffinitiesList

        public int getEnableClientAffinitiesList()
        Returns the enableClientAffinitiesList setting.
      • setEnableClientAffinitiesList

        public void setEnableClientAffinitiesList(int setting)
        Sets the enable client afflinities list
        Parameters:
        setting - The setting to use for the connection.
      • getAffinityFailbackInterval

        public int getAffinityFailbackInterval()
        Returns the affinityFailbackInterval setting.
      • setAffinityFailbackInterval

        public void setAffinityFailbackInterval(int setting)
        Sets the affinity failback interval
        Parameters:
        setting - The setting to use for the connection.
      • getClientRerouteAlternateServerName

        public java.lang.String getClientRerouteAlternateServerName()
        Returns the client reroute alternate server name.
      • setClientRerouteAlternateServerName

        public void setClientRerouteAlternateServerName(java.lang.String alternateServerName)
        Sets the client reroute alternate server name.
      • getClientRerouteAlternatePortNumber

        public java.lang.String getClientRerouteAlternatePortNumber()
        Returns the client reroute alternate server name.
      • setClientRerouteAlternatePortNumber

        public void setClientRerouteAlternatePortNumber(java.lang.String alternatePortNumber)
        Sets the client reroute alternate server name.
      • getMaxRetriesForClientReroute

        public int getMaxRetriesForClientReroute()
        Returns the maxRetriesForClientReroute setting.
      • setMaxRetriesForClientReroute

        public void setMaxRetriesForClientReroute(int setting)
        Sets the maxRetriesForClientReroute.
        Parameters:
        setting - The setting to use for the connection.
      • getRetryIntervalForClientReroute

        public int getRetryIntervalForClientReroute()
        Returns the retryIntervalForClientReroute setting.
      • setRetryIntervalForClientReroute

        public void setRetryIntervalForClientReroute(int setting)
        Sets the retryIntervalForClientReroute.
        Parameters:
        setting - The setting to use for the connection.
      • setEnableSeamlessFailover

        public void setEnableSeamlessFailover(int setting)
        Sets the enable seamless failover property
        Parameters:
        setting - The setting to use for the connection.
      • getEnableSeamlessFailover

        public int getEnableSeamlessFailover()
        Returns the affinityFailbackInteval setting.
      • getUser

        public java.lang.String getUser()
        Returns the value of the 'user' property.
        Returns:
        The user.
      • getXALooselyCoupledSupport

        public int getXALooselyCoupledSupport()
        Returns the value of the "XA loosely couple support" property. This indicates whether lock sharing is allowed for loosely coupled transaction branches.
        Returns:
        The "XA loosely coupled support" setting.

        Possible values include:

        • 0 = Locks cannot be shared
        • 1 = Locks can be shared
      • invalidate

        public void invalidate(java.lang.String user,
                      java.lang.String password)
        Invalidates all pooled connections for the specified user/password. All current available (unallocated) connections for this user/password are closed. As active connections with this user/password are returned to the pool, they are closed.
        Parameters:
        user - The database user.
        password - The database password.
      • isAutoCommit

        public boolean isAutoCommit()
        Returns whether auto-commit mode is the default connection mode for new connections.
        Returns:
        Auto commit. The default value is true.
      • isAutocommitException

        public boolean isAutocommitException()
        Returns whether commit or rollback throws SQLException when autocommit is enabled.
        Returns:
        Autocommit Exception. The default value is false.
      • isBidiImplicitReordering

        public boolean isBidiImplicitReordering()
        Indicates whether bidi implicit reordering is used.
        Returns:
        true if bidi implicit reordering is used; false otherwise. The default value is true.
      • isBidiNumericOrdering

        public boolean isBidiNumericOrdering()
        Indicates whether bidi numeric ordering round trip is used.
        Returns:
        true if bidi numeric ordering round trip is used; false otherwise. The default value is false.
      • isBigDecimal

        public boolean isBigDecimal()
        Indicates whether a big decimal value is returned.
        Returns:
        true if a big decimal is returned; false otherwise. The default value is true.
      • isCursorHold

        public boolean isCursorHold()
        Indicates whether the cursor is held.
        Returns:
        true if the cursor is held; false otherwise. The default value is true.
      • isDataCompression

        public boolean isDataCompression()
        Indicates whether data compression is used.
        Returns:
        true if data compression is used; false otherwise. The default value is true.
      • isDataTruncation

        public boolean isDataTruncation()
        Indicates whether data truncation is used.
        Returns:
        true if data truncation is used; false otherwise. The default value is true.
      • isExtendedDynamic

        public boolean isExtendedDynamic()
        Indicates whether extended dynamic support is used. Extended dynamic support provides a mechanism for caching dynamic SQL statements on the IBM i system. The first time a particular SQL statement is prepared, it is stored in an SQL package on the system. If the package does not exist, it will be automatically created. On subsequent prepares of the same SQL statement, the system can skip a significant part of the processing by using information stored in the SQL package.
        Returns:
        true if extended dynamic support is used; false otherwise. The default value is not to use extended dynamic support.
      • isExtendedMetaData

        public boolean isExtendedMetaData()
        Indicates whether the driver should request extended metadata from the IBM i system. If this property is set to true, the accuracy of the information that is returned from ResultSetMetaData methods getColumnLabel(int), isReadOnly(int), isSearchable(int), and isWriteable(int) will be increased. In addition, the ResultSetMetaData method getSchemaName(int) will be supported with this property set to true. However, performance will be slower with this property on. Leave this property set to its default (false) unless you need more specific information from those methods. For example, without this property turned on, isSearchable(int) will always return true even though the correct answer may be false because the driver does not have enough information from the system to make a judgment. Setting this property to true forces the driver to get the correct data from the system.
        Returns:
        true if extended metadata will be requested; false otherwise. The default value is false.
      • isExtendedMetadata

        public boolean isExtendedMetadata()
        Indicates whether the driver should request extended metadata from the IBM i system. If this property is set to true, the accuracy of the information that is returned from ResultSetMetaData methods getColumnLabel(int), isReadOnly(int), isSearchable(int), and isWriteable(int) will be increased. In addition, the ResultSetMetaData method getSchemaName(int) will be supported with this property set to true. However, performance will be slower with this property on. Leave this property set to its default (false) unless you need more specific information from those methods. For example, without this property turned on, isSearchable(int) will always return true even though the correct answer may be false because the driver does not have enough information from the system to make a judgment. Setting this property to true forces the driver to get the correct data from the IBM i system.
        Returns:
        true if extended metadata will be requested; false otherwise. The default value is false. Note: this method is the same as isExtendedMetaData() so that it corresponds to the connection property name
      • isFullOpen

        public boolean isFullOpen()
        Indicates whether the IBM i system fully opens a file when performing a query. By default the system optimizes opens so they perform better. In certain cases an optimized open will fail. In some cases a query will fail when a database performance monitor is turned on even though the same query works with the monitor turned off. In this case set the full open property to true. This disables optimization on the system.
        Returns:
        true if files are fully opened; false otherwise. The default value is false.
      • isHoldInputLocators

        public boolean isHoldInputLocators()
        Returns the value of the "hold input locators" property
        Returns:
        true If input locators are held.
      • isHoldStatements

        public boolean isHoldStatements()
        Returns the value of the "hold statements" property
        Returns:
        true If statements are held.
      • isJvm16Synchronize

        public boolean isJvm16Synchronize()
        Indicates whether the temporary fix for JVM 1.6 is enabled.
        Returns:
        true if enabled; false otherwise. The default value is true.
      • isLazyClose

        public boolean isLazyClose()
        Indicates whether to delay closing cursors until subsequent requests.
        Returns:
        true to delay closing cursors until subsequent requests; false otherwise. The default value is false.
      • isPackageAdd

        public boolean isPackageAdd()
        Indicates whether to add newly prepared statements to the SQL package specified on the "package" property. This property has no effect unless the extended dynamic property is set to true;
        Returns:
        true If newly prepared statements should be added to the SQL package specified on the "package" property; false otherwise. The default value is true.
      • isPackageCache

        public boolean isPackageCache()
        Indicates whether a subset of the SQL package information is cached in client memory. Caching SQL packages locally reduces the amount of communication to the IBM i system for prepares and describes. This property has no effect unless the extended dynamic property is set to true.
        Returns:
        true if caching is used; false otherwise. The defalut value is false.
      • isPackageClear

        public boolean isPackageClear()
        Deprecated. 
        Indicates whether SQL packages are cleared when they become full. This method has been deprecated. Package clearing and the decision for the threshold where package clearing is needed is now handled automatically by the database.
        Returns:
        Always false. This method is deprecated.
      • isPrefetch

        public boolean isPrefetch()
        Indicates whether data is prefetched upon executing a SELECT statement. This will increase performance when accessing the initial rows in the result set.
        Returns:
        If prefetch is used; false otherwise. The default value is prefetch data.
      • isPrompt

        public boolean isPrompt()
        Indicates whether the user is prompted if a user name or password is needed to connect to the IBM i system. If a connection can not be made without prompting the user, and this property is set to false, then an attempt to connect will fail throwing an exception.
        Returns:
        true if the user is prompted for signon information; false otherwise. The default value is false.
      • isRollbackCursorHold

        public boolean isRollbackCursorHold()
        Returns the value of the "rollback cursor hold" property.
        Returns:
        true if cursors are held across rollbacks; false otherwise.
      • isSavePasswordWhenSerialized

        public boolean isSavePasswordWhenSerialized()
        Indicates whether the password is saved locally with the rest of the properties when this data source object is serialized.

        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.

        Returns:
        true if the password is saved with the rest of the properties when the data source object is serialized; false otherwise. The default value is false.
      • isSecure

        public boolean isSecure()
        Indicates whether a Secure Socket Layer (SSL) connection is used to communicate with the IBM i system. SSL connections are only available when connecting to systems at V4R4 or later.
        Returns:
        true if Secure Socket Layer connection is used; false otherwise. The default value is false.
      • isSecureCurrentUser

        public boolean isSecureCurrentUser()
        Returns the secure current user setting. True indicates to disallow "" and *current for user name and password.
        Returns:
        The secure current user setting.
      • isThreadUsed

        public boolean isThreadUsed()
        Indicates whether a thread is used.
        Returns:
        true if a thread is used; false otherwise. The default value is true.
      • isTrace

        public boolean isTrace()
        Indicates whether trace messages should be logged.
        Returns:
        true if trace message are logged; false otherwise. The default value is false.
      • isTranslateBinary

        public boolean isTranslateBinary()
        Indicates whether binary data is translated. If this property is set to true, then BINARY and VARBINARY fields are treated as CHAR and VARCHAR fields.
        Returns:
        true if binary data is translated; false otherwise. The default value is false.
      • isTranslateBoolean

        public 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. Setting the property to "true", would store the Boolean object in the character field as either "true" or "false". Setting the property to "false", would store the Boolean object in the character field as either "1" or "0".
        Returns:
        true if boolean data is translated; false otherwise. The default value is true.
      • isTrueAutoCommit

        public boolean isTrueAutoCommit()
        Indicates whether true auto commit support is used.
        Returns:
        true if true auto commit support is used; false otherwise. The default value is false.
      • isTrueAutocommit

        public boolean isTrueAutocommit()
        Indicates whether true auto commit support is used.
        Returns:
        true if true auto commit support is used; false otherwise. The default value is false. Note: this method is the same as isTrueAutoCommit() so that it corresponds to the connection property name
      • setAccess

        public void setAccess(java.lang.String access)
        Sets the level of database access for the connection.
        Parameters:
        access - The access level.

        Valid values include:

        • "all" (all SQL statements allowed)
        • "read call" (SELECT and CALL statements allowed)
        • "read only" (SELECT statements only)
        The default value is "all".
      • setAutoCommit

        public void setAutoCommit(boolean value)
        Sets whether auto-commit mode is the default connection mode for new connections.
        Parameters:
        value - The default value is true.
      • setAutocommitException

        public void setAutocommitException(boolean value)
        Sets whether commit or rollback throws SQLException when autocommit is enabled.
        Parameters:
        value - The default value is false.
      • setTrueAutoCommit

        public void setTrueAutoCommit(boolean value)
        Sets whether true auto commit support is used.
        Parameters:
        value - true if true auto commit support should be used; false otherwise. The default value is false.
      • setTrueAutocommit

        public void setTrueAutocommit(boolean value)
        Sets whether true auto commit support is used.
        Parameters:
        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 name
      • setBehaviorOverride

        public void setBehaviorOverride(int behaviors)
        Sets the Toolbox JDBC Driver behaviors to override. Multiple behaviors can be changed in combination by adding the constants and passing that sum on the this method.
        Parameters:
        behaviors - The driver behaviors to override.

        Valid values include:

        • 1 - Do not throw an exception if Statement.executeQuery() or PreparedStatement.executeQuery() do not return a result set. Instead, return null for the result set.
        Carefully consider the result of overriding the default behavior of the driver. For example, setting the value of this property to 1 means the driver will no longer thrown an exception even though the JDBC 3.0 specification states throwing an exception is the correct behavior. Be sure your application correctly handles the altered behavior.
      • setBidiStringType

        public void setBidiStringType(int bidiStringType)
        Sets the output string type of bidi data. See BidiStringType for more information and valid values.
        Parameters:
        bidiStringType - output bidi string type
      • setBidiImplicitReordering

        public void setBidiImplicitReordering(boolean value)
        Sets whether bidi implicit reordering is used. In this version, the parameter is used to determine whether Bidi layout transformation should be applied to meta-data such as columns names.
        Parameters:
        value - true if implicit reordering should be used; false otherwise. The default value is true.
      • setBidiNumericOrdering

        public void setBidiNumericOrdering(boolean value)
        Sets whether bidi numeric ordering round trip is used.
        Parameters:
        value - true if numeric ordering round trip should be used; false otherwise. The default value is false.
      • setBigDecimal

        public void setBigDecimal(boolean value)
        Sets whether a big decimal value is returned.
        Parameters:
        value - true if a big decimal is returned; false otherwise. The default value is true.
      • setBlockCriteria

        public void setBlockCriteria(int blockCriteria)
        Sets the criteria for retrieving data from the IBM i system in blocks of records. Specifying a non-zero value for this property will reduce the frequency of communication to the system, and therefore increase performance.
        Parameters:
        blockCriteria - The block criteria.

        Valid values include:

        • 0 (no record blocking)
        • 1 (block if FOR FETCH ONLY is specified)
        • 2 (block if FOR UPDATE is specified) - The default value.
      • setBlockSize

        public void setBlockSize(int blockSize)
        Sets the block size in kilobytes to retrieve from the IBM i system and cache on the client. This property has no effect unless the block criteria property is non-zero. Larger block sizes reduce the frequency of communication to the system, and therefore may increase performance.
        Parameters:
        blockSize - The block size in kilobytes.

        Valid values include:

        • 0
        • 8
        • 16
        • 32 - The default value.
        • 64
        • 128
        • 256
        • 512
      • setCharacterTruncation

        public void setCharacterTruncation(java.lang.String setting)
        Sets the character truncation property, which indicates how the driver should handle character truncation errors.
        Parameters:
        setting - The character truncation behavior.

        Valid values are:

        • "default" ()
        • "warning" ()
        • "none" ()
        The default value is "default".
      • setCursorSensitivity

        public void setCursorSensitivity(java.lang.String cursorSensitivity)
        Sets the cursor sensitivity to be requested from the database. If the resultSetType is ResultSet.TYPE_FORWARD_ONLY or ResultSet.TYPE_SCROLL_SENSITIVE, the value of this property will control what cursor sensitivity is requested from the database. If the resultSetType is ResultSet.TYPE_SCROLL_INSENSITIVE, this property will be ignored.

        Valid values include:

        • "asensitive"
        • "insensitive"
        • "sensitive"
        The default is "asensitive". This property is ignored when connecting to systems running V5R1 and earlier versions of OS/400.
        Parameters:
        cursorSensitivity - cursor sensitivity
      • setCursorHold

        public void setCursorHold(boolean cursorHold)
        Sets whether the cursor is held.
        Parameters:
        cursorHold - true if the cursor is held; false otherwise. The default value is true.
      • setDatabaseName

        public void setDatabaseName(java.lang.String databaseName)
        Sets the databaseName property. This property is ignored when connecting to systems running V5R1 and earlier versions of OS/400. If a database name is specified it must exist in the relational database directory on the IBM i system. Use IBM i command WRKRDBDIRE to view the directory. The following criteria are used to determine which database is accessed:
        1. If a database name is specified, that database is used. Attempts to connect will fail if the database does not exist.
        2. If special value *SYSBAS is specified, the system default database is used.
        3. If a database name is not specified, the database specified in the job description for the user profile is used.
        4. If a database name is not specified and a database is not specified in the job description for the user profile, the system default database is used.
        Parameters:
        databaseName - The database name or *SYSBAS.
        Throws:
        ExtendedIllegalStateException - If the data source is already in use.
      • setDataCompression

        public void setDataCompression(boolean compression)
        Sets whether to use data compression. The default value is true.
        Parameters:
        compression - true if data compression is used; false otherwise.
      • setDataSourceName

        public void setDataSourceName(java.lang.String dataSourceName)
        Sets the dataSourceName property. This property can be used for connection pooling implementations. dataSourceName is assumed to be bound (via JNDI) to an instance of 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.

        Parameters:
        dataSourceName - The data source name.
        Throws:
        ExtendedIllegalStateException - If the data source is already in use.
      • setDataTruncation

        public void setDataTruncation(boolean truncation)
        Sets whether to use data truncation. The default value is true.
        Parameters:
        truncation - true if data truncation is used; false otherwise.
      • setDateFormat

        public void setDateFormat(java.lang.String dateFormat)
        Sets the date format used in date literals within SQL statements.
        Parameters:
        dateFormat - The date format.

        Valid values include:

        • "mdy"
        • "dmy"
        • "ymd"
        • "usa"
        • "iso"
        • "eur"
        • "jis"
        • "julian"
        • "" (server job value) - default.
        The default is based on the server job.
      • setDateSeparator

        public void setDateSeparator(java.lang.String dateSeparator)
        Sets the date separator used in date literals within SQL statements. This property has no effect unless the "data format" property is set to: "julian", "mdy", "dmy", or "ymd".
        Parameters:
        dateSeparator - The date separator.

        Valid values include:

        • "/" (slash)
        • "-" (dash)
        • "." (period)
        • "," (comma)
        • " " (space)
        • "" (server job value) - default.
        The default value is based on the server job.
      • setDecfloatRoundingMode

        public void setDecfloatRoundingMode(java.lang.String decfloatRoundingMode)
        Sets the decfloat rounding mode.
        Parameters:
        decfloatRoundingMode - The decfloat rounding mode.

        Valid values include:

        • "half even" - default
        • "half up"
        • "down"
        • "ceiling"
        • "floor"
        • "half down"
        • "up"
      • setDecimalDataErrors

        public void setDecimalDataErrors(java.lang.String setting)
        Sets the decimal data errors setting
        Parameters:
        setting - The errors setting.
      • setDecimalSeparator

        public void setDecimalSeparator(java.lang.String decimalSeparator)
        Sets the decimal separator used in numeric literals within SQL statements.
        Parameters:
        decimalSeparator - The decimal separator.

        Valid values include:

        • "." (period)
        • "," (comma)
        • "" (server job value) - default.
        The default value is based on the server job.
      • setDescribeOption

        public void setDescribeOption(java.lang.String option)
        Sets the describe option.
        Parameters:
        option - The describe option.
      • setIgnoreWarnings

        public void setIgnoreWarnings(java.lang.String ignoreWarnings)
        Sets the ignore warnings property.
        Parameters:
        ignoreWarnings - Specifies a list of SQL states for which the driver should not create warning objects.
      • setDescription

        public void setDescription(java.lang.String description)
        Sets the data source description.
        Parameters:
        description - The description.
      • setSort

        public void setSort(java.lang.String sort)
        Sets how the IBM i system sorts records before sending them to the client.
        Parameters:
        sort - The sort value.

        Valid values include:

        • "hex" (base the sort on hexadecimal values)
        • "language" (base the sort on the language set in the sort language property)
        • "table" (base the sort on the sort sequence table set in the sort table property).
        The default value is "hex".
      • setErrors

        public 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.
        Parameters:
        errors - The error message level. Valid values include: "basic" and "full". The default value is "basic".
      • setExtendedDynamic

        public void setExtendedDynamic(boolean extendedDynamic)
        Sets whether to use extended dynamic support. Extended dynamic support provides a mechanism for caching dynamic SQL statements on the IBM i system. The first time a particular SQL statement is prepared, it is stored in an SQL package on the system. If the package does not exist, it will be automatically created. On subsequent prepares of the same SQL statement, the system can skip a significant part of the processing by using information stored in the SQL package. If this is set to "true", then a package name must be set using the "package" property.
        Parameters:
        extendedDynamic - If extended dynamic support is used; false otherwise. The default value is not to use extended dynamic support.
      • setExtendedMetaData

        public void setExtendedMetaData(boolean extendedMetaData)
        Sets whether the driver should request extended metadata from the IBM i system. This property is ignored when connecting to systems running V5R1 and earlier versions of OS/400. If this property is set to true and connecting to a system running V5R2 or later version of IBM i, the accuracy of the information that is returned from ResultSetMetaData methods getColumnLabel(int), isReadOnly(int), isSearchable(int), and isWriteable(int) will be increased. In addition, the ResultSetMetaData method getSchemaName(int) will be supported with this property set to true. However, performance will be slower with this property on. Leave this property set to its default (false) unless you need more specific information from those methods. For example, without this property turned on, isSearchable(int) will always return true even though the correct answer may be false because the driver does not have enough information from the system to make a judgment. Setting this property to true forces the driver to get the correct data from the system.
        Parameters:
        extendedMetaData - True to request extended metadata from the system, false otherwise. The default value is false.
      • setExtendedMetadata

        public void setExtendedMetadata(boolean extendedMetaData)
        Sets whether the driver should request extended metadata from the IBM i system. This property is ignored when connecting to systems running OS/400 V5R1 and earlier. If this property is set to true and connecting to a system running OS/400 V5R2 or IBM i, the accuracy of the information that is returned from ResultSetMetaData methods getColumnLabel(int), isReadOnly(int), isSearchable(int), and isWriteable(int) will be increased. In addition, the ResultSetMetaData method getSchemaName(int) will be supported with this property set to true. However, performance will be slower with this property on. Leave this property set to its default (false) unless you need more specific information from those methods. For example, without this property turned on, isSearchable(int) will always return true even though the correct answer may be false because the driver does not have enough information from the system to make a judgment. Setting this property to true forces the driver to get the correct data from the system.
        Parameters:
        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 name
      • setFullOpen

        public void setFullOpen(boolean fullOpen)
        Sets whether to fully open a file when performing a query. By default the IBM i system optimizes opens so they perform better. In most cases optimization functions correctly and improves performance. Running a query repeatedly when a database performance monitor is turned on may fail because of the optimization, however. Leave this property set to its default (false) until you experience errors running queries with monitors turned on. At that time set the property to true which will disable the optimization.
        Parameters:
        fullOpen - True to fully open a file (turn off optimizations), false to allow optimizations. The default value is false.
      • setHoldInputLocators

        public void setHoldInputLocators(boolean hold)
        Sets the "hold input locators" property
        Parameters:
        hold - True to hold input locators. The default value is true.
      • setHoldStatements

        public void setHoldStatements(boolean hold)
        Sets the "hold statements" property
        Parameters:
        hold - True to hold statements. The default value is false.
      • setJvm16Synchronize

        public void setJvm16Synchronize(boolean value)
        Indicates whether the temporary fix for JVM 1.6 is enabled.
        Parameters:
        value - true if JVM 1.6 fix is enabled; false otherwise. The default value is true.
      • setLazyClose

        public void setLazyClose(boolean lazyClose)
        Sets whether to delay closing cursors until subsequent requests.
        Parameters:
        lazyClose - true to delay closing cursors until subsequent requests; false otherwise. The default value is false.
      • setLibraries

        public void setLibraries(java.lang.String libraries)
        Sets the libraries to add to the server job's library list. The libraries are delimited by commas or spaces, and "*LIBL" may be used as a place holder for the server job's current library list. The library list is used for resolving unqualified stored procedure calls and finding schemas in DatabaseMetaData catalog methods. If "*LIBL" is not specified, the specified libraries will replace the server job's current library list.
        Parameters:
        libraries - The library list.
      • setLobThreshold

        public void setLobThreshold(int threshold)
        Sets the maximum LOB (large object) size in bytes that can be retrieved as part of a result set. LOBs that are larger than this threshold will be retrieved in pieces using extra communication to the IBM i system. Larger LOB thresholds will reduce the frequency of communication to the system, but will download more LOB data, even if it is not used. Smaller LOB thresholds may increase frequency of communication to the system, but will only download LOB data as it is needed.
        Parameters:
        threshold - The lob threshold. Valid range is 0-16777216. The default value is 32768.
      • setLoginTimeout

        public void setLoginTimeout(int timeout)
                             throws java.sql.SQLException
        Sets the maximum time in seconds that this data source can wait while attempting to connect to a database. A value of zero specifies that the timeout is the system default if one exists; otherwise it specifies that there is no timeout. The default value is initially zero.
        Note: This value is not used or supported by the Toolbox JDBC driver. Rather, the timeout value is determined by the IBM i system.
        Specified by:
        setLoginTimeout in interface javax.sql.CommonDataSource
        Parameters:
        timeout - The login timeout in seconds.
        Throws:
        java.sql.SQLException
      • setLogWriter

        public void setLogWriter(java.io.PrintWriter writer)
                          throws java.sql.SQLException
        Sets the log writer for this data source.

        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).

        Specified by:
        setLogWriter in interface javax.sql.CommonDataSource
        Parameters:
        writer - The log writer; to disable, set to null.
        Throws:
        java.sql.SQLException - If a database error occurs.
      • setMetaDataSource

        public void setMetaDataSource(int mds)
        Sets how to retrieve DatabaseMetaData. If set to 0, database metadata will be retrieved through the ROI data flow. If set to 1, database metadata will be retrieved by calling system stored procedures. The methods that currently are available through stored procedures are: getColumnPrivileges
        Parameters:
        mds - The setting for metadata source The default value is 1.
      • setMetadataSource

        public void setMetadataSource(int mds)
        Sets how to retrieve DatabaseMetaData. If set to 0, database metadata will be retrieved through the ROI data flow. If set to 1, database metadata will be retrieved by calling system stored procedures. The methods that currently are available through stored procedures are: getColumnPrivileges
        Parameters:
        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 name
      • setNaming

        public void setNaming(java.lang.String naming)
        Sets the naming convention used when referring to tables.
        Parameters:
        naming - The naming convention. Valid values include: "sql" (e.g. schema.table) and "system" (e.g. schema/table). The default value is "sql".
      • setPackage

        public void setPackage(java.lang.String packageName)
        Sets the base name of the SQL package. Note that only the first six characters are used to generate the name of the SQL package on the IBM i system. This property has no effect unless the extended dynamic property is set to true. In addition, this property must be set if the extended dynamic property is set to true.
        Parameters:
        packageName - The base name of the SQL package.
      • setPackageAdd

        public void setPackageAdd(boolean add)
        Sets whether to add newly prepared statements to the SQL package specified on the "package" property. This property has no effect unless the extended dynamic property is set to true.
        Parameters:
        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.
      • setPackageCache

        public void setPackageCache(boolean cache)
        Sets whether to cache a subset of the SQL package information in client memory. Caching SQL packages locally reduces the amount of communication to the IBM i system for prepares and describes. This property has no effect unless the extended dynamic property is set to true.
        Parameters:
        cache - True if caching is used; false otherwise. The default value is false.
      • setPackageClear

        public void setPackageClear(boolean clear)
        Deprecated. 
        Sets whether to clear SQL packages when they become full. This method has been deprecated. Package clearing and the decision for the threshold where package clearing is needed is now handled automatically by the database.
        Parameters:
        clear - If the SQL package are cleared when full; false otherwise.
      • setPackageCriteria

        public void setPackageCriteria(java.lang.String packageCriteria)
        Sets the type of SQL statement to be stored in the SQL package. This can be useful to improve the performance of complex join conditions. This property has no effect unless the extended dynamic property is set to true.
        Parameters:
        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".
      • setPackageError

        public void setPackageError(java.lang.String packageError)
        Sets the action to take when SQL package errors occur. When an SQL package error occurs, the driver will optionally throw an SQLException or post a warning to the Connection, based on the value of this property. This property has no effect unless the extended dynamic property is set to true.
        Parameters:
        packageError - The action when SQL errors occur. Valid values include: "exception", "warning", and "none". The default value is "warning".
      • setPackageLibrary

        public void setPackageLibrary(java.lang.String packageLibrary)
        Sets the library for the SQL package. This property has no effect unless the extended dynamic property is set to true.
        Parameters:
        packageLibrary - The SQL package library. The default package library is "QGPL".
      • setPassword

        public void setPassword(java.lang.String password)
        Sets the 'password' property.
        Parameters:
        password - The password.
      • setPassword

        public void setPassword(char[] password)
        Sets the 'password' property.
        Parameters:
        password - The password.
      • setPrefetch

        public void setPrefetch(boolean prefetch)
        Sets whether to prefetch data upon executing a SELECT statement. This will increase performance when accessing the initial rows in the result set.
        Parameters:
        prefetch - If prefetch is used; false otherwise. The default value is to prefectch data.
      • setPrompt

        public 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. If a connection can not be made without prompting the user, and this property is set to false, then an attempt to connect will fail.
        Parameters:
        prompt - true if the user is prompted for signon information; false otherwise. The default value is false.
      • setProperties

        public 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). This method simply parses property string and then calls setPropertes(Properties). This method is intended as an enhancement so that the user does not have to write new code to call the setters for new/deleted properties.
        Parameters:
        propertiesString - list of ";" delimited properties
      • setProperties

        public void setProperties(java.util.Properties newProperties)
        Sets the properties for this datasource. This method is intended as an enhancement so that the user does not have to write new code to call the setters for new/deleted properties.
        Parameters:
        newProperties - object containing updated property values
      • setProxyServer

        public void setProxyServer(java.lang.String proxyServer)
        Sets the name of the proxy server.
        Parameters:
        proxyServer - The proxy server.
      • setQueryOptimizeGoal

        public void setQueryOptimizeGoal(int goal)
        Sets the "query optimize goal" property
        Parameters:
        goal - - the optimization goal

        Valid values include:

        • 0 = Optimize query for first block of data (*ALLIO) when extended dynamic packages are used; Optimize query for entire result set (*FIRSTIO) when packages are not used
        • 1 = Optimize query for first block of data (*FIRSTIO)
        • 2 = Optimize query for entire result set (*ALLIO)
        The default value is 0.
      • setQueryReplaceTruncatedParameter

        public 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.
        Parameters:
        value - The value to use when a parameter is truncated.
      • setQueryTimeoutMechanism

        public 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.
        Parameters:
        timeoutMechanism - The timeout mechanism to use.

        Valid values include:

        • "qqrytimlmt" (QQRTIMLMT will be used)
        • "cancel" (cancel will be used)
        The default value is "character".
      • setQueryStorageLimit

        public void setQueryStorageLimit(int limit)
        Sets the storage limit in megabytes, that should be used for statements executing a query in a connection. Note, this setting is ignored when running to i5/OS V5R4 or earlier
        Parameters:
        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.

      • setRemarks

        public void setRemarks(java.lang.String remarks)
        Sets the source of the text for REMARKS columns in ResultSets returned by DatabaseMetaData methods.
        Parameters:
        remarks - The text source. Valid values include: "sql" (SQL object comment) and "system" (IBM i object description). The default value is "system".
      • setRollbackCursorHold

        public void setRollbackCursorHold(boolean hold)
        Sets the "rollback cursor hold" property
        Parameters:
        hold - True to hold cursor across rollbacks. The default value is false.
      • setSecondaryUrl

        public 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. This property allows you to use this driver to connect to databases other than DB2 for IBM i. Use a backslash as an escape character before backslashes and semicolons in the URL.
        Parameters:
        url - The secondary URL.
      • setSecondaryURL

        public 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. This property allows you to use this driver to connect to databases other than DB2 for IBM i. Use a backslash as an escape character before backslashes and semicolons in the URL.
        Parameters:
        url - The secondary URL. Note: this method is the same as setSecondaryUrl() so that it corresponds to the connection property name
      • setSecure

        public void setSecure(boolean secure)
        Sets whether a Secure Socket Layer (SSL) connection is used to communicate with the IBM i system. SSL connections are only available when connecting to systems at V4R4 or later.
        Parameters:
        secure - true if Secure Socket Layer connection is used; false otherwise. The default value is false.
        Throws:
        ExtendedIllegalStateException - If the data source was as secure and secure is false.
      • setSecureCurrentUser

        public void setSecureCurrentUser(boolean secureCurrentUser)
        Sets whether to disallow "" and *current as user name and password. True indicates to disallow "" and *current for user name and password.
        Parameters:
        secureCurrentUser - The secure current user setting.
      • setServerName

        public void setServerName(java.lang.String serverName)
        Sets the serverName property.
        Parameters:
        serverName - The system name.
        Throws:
        ExtendedIllegalStateException - If the data source is already in use.
      • setServerTraceCategories

        public void setServerTraceCategories(int traceCategories)
        Enables tracing of the JDBC server job. If tracing is enabled, tracing is started when the client connects to the IBM i system, and ends when the connection is disconnected. Tracing must be started before connecting to the system since the client enables tracing only at connect time.

        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);
           
        Parameters:
        traceCategories - level of tracing to start.

        Valid values include:

        • SERVER_TRACE_START_DATABASE_MONITOR - Start the database monitor on the JDBC server job. The numeric value of this constant is 2.
        • SERVER_TRACE_DEBUG_SERVER_JOB - Start debug on the JDBC server job. The numeric value of this constant is 4.
        • SERVER_TRACE_SAVE_SERVER_JOBLOG - Save the joblog when the JDBC server job ends. The numeric value of this constant is 8.
        • SERVER_TRACE_TRACE_SERVER_JOB - Start job trace on the JDBC server job. The numeric value of this constant is 16.
        • SERVER_TRACE_SAVE_SQL_INFORMATION - Save SQL information. The numeric value of this constant is 32.

        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.

      • setServerTrace

        public void setServerTrace(int traceCategories)
        Enables tracing of the JDBC server job. If tracing is enabled, tracing is started when the client connects to the IBM i system, and ends when the connection is disconnected. Tracing must be started before connecting to the system since the client enables tracing only at connect time.

        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);
           
        Parameters:
        traceCategories - level of tracing to start.

        Valid values include:

        • SERVER_TRACE_START_DATABASE_MONITOR - Start the database monitor on the JDBC server job. The numeric value of this constant is 2.
        • SERVER_TRACE_DEBUG_SERVER_JOB - Start debug on the JDBC server job. The numeric value of this constant is 4.
        • SERVER_TRACE_SAVE_SERVER_JOBLOG - Save the joblog when the JDBC server job ends. The numeric value of this constant is 8.
        • SERVER_TRACE_TRACE_SERVER_JOB - Start job trace on the JDBC server job. The numeric value of this constant is 16.
        • SERVER_TRACE_SAVE_SQL_INFORMATION - Save SQL information. The numeric value of this constant is 32.

        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

      • setDriver

        public void setDriver(java.lang.String driver)
        Sets the JDBC driver implementation. This property has no effect if the "secondary URL" property is set. This property cannot be set to "native" if the environment is not an IBM i Java Virtual Machine. param driver The driver value.

        Valid values include:

        • "toolbox" (use the IBM Toolbox for Java JDBC driver)
        • "native" (use the IBM Developer Kit for Java JDBC driver)
        The default value is "toolbox". Note: Not supported in a connection pool.
        Parameters:
        driver -
      • setSavePasswordWhenSerialized

        public void setSavePasswordWhenSerialized(boolean savePassword)
        Sets whether to save the password locally with the rest of the properties when this data source object is serialized.

        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.

        Parameters:
        savePassword - true if the password is saved; false otherwise. The default value is false
      • setSocketTimeout

        public void setSocketTimeout(int milliseconds)
        This property enables/disables socket timeout with the specified value in milliseconds. A timeout value must be greater than zero, a value of zero for this property indicates infinite timeout.
        Parameters:
        milliseconds - The socket timeout option value.
      • setSortLanguage

        public void setSortLanguage(java.lang.String language)
        Sets the three-character language id to use for selection of a sort sequence. This property has no effect unless the sort property is set to "language".
        Parameters:
        language - The three-character language id. The default value is ENU.
      • setSortTable

        public void setSortTable(java.lang.String table)
        Sets the library and file name of a sort sequence table stored on the IBM i system. This property has no effect unless the sort property is set to "table". The default is an empty String ("").
        Parameters:
        table - The qualified sort table name.
      • setSortWeight

        public void setSortWeight(java.lang.String sortWeight)
        Sets how the IBM i system treats case while sorting records. This property has no effect unless the sort property is set to "language".
        Parameters:
        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".
      • setThreadUsed

        public void setThreadUsed(boolean threadUsed)
        Sets whether a thread is used.
        Parameters:
        threadUsed - true if a thread is used; false otherwise. The default value is true.
      • setTimeFormat

        public void setTimeFormat(java.lang.String timeFormat)
        Sets the time format used in time literals with SQL statements.
        Parameters:
        timeFormat - The time format.

        Valid values include:

        • "hms"
        • "usa"
        • "iso"
        • "eur"
        • "jis"
        • "" (server job value) - default.
        The default value is based on the server job.
      • setTimeSeparator

        public void setTimeSeparator(java.lang.String timeSeparator)
        Sets the time separator used in time literals within SQL statements. This property has no effect unless the time format property is set to "hms".
        Parameters:
        timeSeparator - The time separator.

        Valid values include:

        • ":" (colon)
        • "." (period)
        • "," (comma)
        • " " (space)
        • "" (server job value) - default.
        The default value is based on the server job.
      • setTimestampFormat

        public void setTimestampFormat(java.lang.String timestampFormat)
        Sets the timestamp format used by getString.
        Parameters:
        timestampFormat - The timestamp format.

        Valid values include:

        • "iso"
        • "ibmsql"
      • setTrace

        public void setTrace(boolean trace)
        Sets whether trace messages should be logged. Trace messages are useful for debugging programs that call JDBC. However, there is a performance penalty associated with logging trace messages, so this property should only be set to true for debugging. Trace messages are logged to System.out.
        Parameters:
        trace - true if trace message are logged; false otherwise. The default value is false.
      • setTransactionIsolation

        public void setTransactionIsolation(java.lang.String transactionIsolation)
        Sets the IBM i system's transaction isolation.
        Parameters:
        transactionIsolation - The transaction isolation level.

        Valid values include:

        • "none"
        • "read uncommitted" - The default value.
        • "read committed"
        • "repeatable read"
        • "serializable"
      • setTranslateBinary

        public void setTranslateBinary(boolean translate)
        Sets whether binary data is translated. If this property is set to true, then BINARY and VARBINARY fields are treated as CHAR and VARCHAR fields.
        Parameters:
        translate - true if binary data is translated; false otherwise. The default value is false.
      • setTranslateBoolean

        public 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. Setting the property to "true", would store the Boolean object in the character field as either "true" or "false". Setting the property to "false", would store the Boolean object in the character field as either "1" or "0".
        Parameters:
        translate - if boolean data is translated; false otherwise. The default value is true.
      • setUser

        public void setUser(java.lang.String user)
        Sets the 'user' property.
        Parameters:
        user - The user.
        Throws:
        ExtendedIllegalStateException - If the data source is already in use.
      • setXALooselyCoupledSupport

        public void setXALooselyCoupledSupport(int lcs)
        Sets whether lock sharing is allowed for loosely coupled transaction branches. Note, this setting is ignored when running to V5R3 IBM i or earlier.
        Parameters:
        lcs - - the "XA loosely coupled support" setting

        Valid values include:

        • 0 = Locks cannot be shared
        • 1 = Locks can be shared
        The default value is 0.
      • isKeepAlive

        public boolean isKeepAlive()
        Gets the socket 'keepalive' option.
        Returns:
        The value of the keepalive option.
      • getReceiveBufferSize

        public int getReceiveBufferSize()
        Gets the socket 'receive buffer size' option. NOTE: This does not get the actual receive buffer size, only the option which is used as a hint by the underlying socket code.
        Returns:
        The value of the receive buffer size option.
      • getSendBufferSize

        public int getSendBufferSize()
        Gets the socket 'send buffer size' option. NOTE: This does not get the actual send buffer size, only the option which is used as a hint by the underlying socket code.
        Returns:
        The value of the send buffer size option.
      • getSoLinger

        public long getSoLinger()
        Gets the socket 'linger' option, in milliseconds.
        Returns:
        The value of the linger option.
      • getSoTimeout

        public long getSoTimeout()
        Gets the socket 'timeout' option in milliseconds.
        Returns:
        The value of the timeout option.
      • isTcpNoDelay

        public boolean isTcpNoDelay()
        Gets the socket 'TCP no delay' option.
        Returns:
        The value of the TCP no delay option.
      • setKeepAlive

        public void setKeepAlive(boolean keepAlive)
        Turns on the socket 'keepAlive' property.
        Parameters:
        keepAlive - The keepalive option value.
      • setNumericRangeError

        public void setNumericRangeError(java.lang.String setting)
        Sets the numeric range error property, which indicates how the driver should handle numberic range errors.
        Parameters:
        setting - The numeric range error behavior.

        Valid values are:

        • "default" ()
        • "warning" ()
        • "none" ()
        The default value is "character".
      • setReceiveBufferSize

        public void setReceiveBufferSize(int size)
        Sets the socket 'receive buffer size' option to the specified value. The receive buffer size option is used as a hint for the size to set the underlying network I/O buffers. Increasing the receive buffer size can increase the performance of network I/O for high-volume connection, while decreasing it can help reduce the backlog of incoming data. This value must be greater than 0.
        Parameters:
        size - The receive buffer size option value.
      • setSendBufferSize

        public void setSendBufferSize(int size)
        Sets the socket 'send buffer size' option to the specified value. The send buffer size option is used by the platform's networking code as a hint for the size to set the underlying network I/O buffers. This value must be greater than 0.
        Parameters:
        size - The send buffer size option value.
      • setSoLinger

        public void setSoLinger(long milliseconds)
        Sets the socket 'linger' property to the specified linger time in milliseconds. The maximum value for this property is platform specific.
        Parameters:
        milliseconds - The linger option value.
      • setSoTimeout

        public void setSoTimeout(long milliseconds)
        Enables/disables socket timeout with the specified value in milliseconds. A timeout value must be greater than zero, a value of zero for this property indicates infinite timeout.
        Parameters:
        milliseconds - The timeout option value.
      • setTcpNoDelay

        public void setTcpNoDelay(boolean noDelay)
        Sets the socket 'TCP no delay' option.
        Parameters:
        noDelay - The TCP no delay option value.
      • getPackageCCSID

        public 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. Default value: 13488
        Returns:
        The value of the package CCSID property.
      • getPackageCcsid

        public 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. Default value: 13488
        Returns:
        The value of the package CCSID property. Note: this method is the same as getPackageCCSID() so that it corresponds to the connection property name
      • setPackageCCSID

        public 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. Recommended values: 1200(UTF-16) and 13488 (UCS-2). See BidiStringType for Bidi considerations. Default value: 13488
        Parameters:
        ccsid - The package CCSID.
      • setPackageCcsid

        public 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. Recommended values: 1200(UTF-16) and 13488 (UCS-2). See BidiStringType for Bidi considerations. Default value: 13488
        Parameters:
        ccsid - The package CCSID. Note: this method is the same as setPackageCCSID() so that it corresponds to the connection property name
      • setPortNumber

        public void setPortNumber(int portNumber)
        Sets the portNumber property, which indicates the port number that should be used when connecting to the server.
        Parameters:
        portNumber -
      • getMinimumDivideScale

        public int getMinimumDivideScale()
        Gets the minimum divide scale property. This property ensures the scale of the result of decimal division is never less than its specified value. Valid values: 0-9. 0 is default.
        Returns:
        The minimum divide scale.
      • getMaximumBlockedInputRows

        public int getMaximumBlockedInputRows()
        Gets the maximum block input rows. This property indicates the number of rows sent to the database engine for a block insert operation. Valid values: 1-32000. 32000 is default.
        Returns:
        The maximum block input rows
      • getMaximumPrecision

        public int getMaximumPrecision()
        Gets the maximum precision property. This property indicates the maximum decimal precision the IBM i system should use. Valid values: 31 or 63. 31 is default.
        Returns:
        The maximum precision.
      • getMaximumScale

        public int getMaximumScale()
        Gets the maximum scale property. This property indicates the maximum decimal scale the IBM i system should use. Valid values: 0-63. 31 is default.
        Returns:
        The maximum scale.
      • setMinimumDivideScale

        public void setMinimumDivideScale(int scale)
        Sets the minimum divide scale property. This property ensures the scale of the result of decimal division is never less than its specified value. Valid values: 0-9. 0 is default.
        Parameters:
        scale - The minimum divide scale.
      • setMaximumBlockedInputRows

        public void setMaximumBlockedInputRows(int maximumBlockedInputRows)
        Sets the maximum blocked input rows. This property indicates the maximum number of rows sent to the database engine for a blocked input operation. Valid values: 1-32000. 32000 is the default
        Parameters:
        maximumBlockedInputRows - The maximum number of input rows
      • setMaximumPrecision

        public void setMaximumPrecision(int precision)
        Sets the maximum precision property. This property indicates the maximum decimal precision the IBM i system should use. Valid values: 31 or 63. 31 is default.
        Parameters:
        precision - The maximum precision.
      • setMaximumScale

        public void setMaximumScale(int scale)
        Sets the maximum scale property. This property indicates the maximum decimal scale the IBM i system should use. Valid values: 0-63. 31 is default.
        Parameters:
        scale - The maximum scale.
      • getTranslateHex

        public java.lang.String getTranslateHex()
        Gets the translate hex property, which indicates how the parser will treat hexadecimal literals.
        Returns:
        The value of the translate hex property.

        Valid values include:

        • "character" (Interpret hexadecimal constants as character data)
        • "binary" (Interpret hexadecimal constants as binary data)
        The default value is "character".
      • setTranslateHex

        public void setTranslateHex(java.lang.String parseOption)
        Sets the translate hex property, which indicates how the parser will treat hexadecimal literals.
        Parameters:
        parseOption - The hex constant parser option.

        Valid values include:

        • "character" (Interpret hexadecimal constants as character data)
        • "binary" (Interpret hexadecimal constants as binary data)
        The default value is "character".
      • isUseBlockUpdate

        public boolean isUseBlockUpdate()
        Gets the use block update property, which indicates whether blocked update support will be used.
        Returns:
        The value of the use block update.
      • isUseDrdaMetadataVersion

        public boolean isUseDrdaMetadataVersion()
        Gets the use DRDA metadata version property, which indicates if the DatabaseMetadata.getVersion method should return the DRDA metadata.
        Returns:
        The value of the DRDA metadata version property.
      • setUseBlockUpdate

        public void setUseBlockUpdate(boolean option)
        Sets the use block update property, which indicates whether blocked update support will be used.
        Parameters:
        option - The use block update option.
      • setUseDrdaMetadataVersion

        public void setUseDrdaMetadataVersion(boolean option)
        Sets the use drda metadata version property, which indicates whether the drda metadata version should be returned DatabaseMetadata.getVersion.
        Parameters:
        option - The use drda metadata version option.
      • getVariableFieldCompression

        public java.lang.String getVariableFieldCompression()
        Gets the variable field compression property, which when variable field compression is used.
        Returns:
        The value of the variable field compression property.
      • setVariableFieldCompression

        public void setVariableFieldCompression(java.lang.String option)
        Sets the variable field compression property.
        Parameters:
        option - The variable field compression setting.
      • setQaqqiniLibrary

        public void setQaqqiniLibrary(java.lang.String libraryName)
        Sets the QAQQINI library name.
        Parameters:
        libraryName - The QAQQINI library name.
      • setQaqqinilib

        public void setQaqqinilib(java.lang.String libraryName)
        Sets the QAQQINI library name.
        Parameters:
        libraryName - The QAQQINI library name. Note: this method is the same as setQaqqiniLibrary() so that it corresponds to the connection property name
      • getToolboxTraceCategory

        public java.lang.String getToolboxTraceCategory()
        Returns the toolbox trace category.
        Returns:
        The toolbox trace category.

        Valid values include:

        • "none" - The default value.
        • "datastream"
        • "diagnostic"
        • "error"
        • "information"
        • "warning"
        • "conversion"
        • "proxy"
        • "pcml"
        • "jdbc"
        • "all"
        • "thread"
      • getToolboxTrace

        public java.lang.String getToolboxTrace()
        Returns the toolbox trace category.
        Returns:
        The toolbox trace category.

        Valid values include:

        • "none" - The default value.
        • "datastream"
        • "diagnostic"
        • "error"
        • "information"
        • "warning"
        • "conversion"
        • "proxy"
        • "pcml"
        • "jdbc"
        • "all"
        • "thread"
        Note: this method is the same as getToolboxTraceCategory() so that it corresponds to the connection property name
      • setToolboxTraceCategory

        public void setToolboxTraceCategory(java.lang.String traceCategory)
        Sets the toolbox trace category, which indicates what trace points and diagnostic messages should be logged.
        Parameters:
        traceCategory - The category option.

        Valid values include:

        • "none"
        • "datastream"
        • "diagnostic"
        • "error"
        • "information"
        • "warning"
        • "conversion"
        • "proxy"
        • "pcml"
        • "jdbc"
        • "all"
        • "thread"
        The default value is "none".
      • setToolboxTrace

        public void setToolboxTrace(java.lang.String traceCategory)
        Sets the toolbox trace category, which indicates what trace points and diagnostic messages should be logged.
        Parameters:
        traceCategory - The category option.

        Valid values include:

        • "none"
        • "datastream"
        • "diagnostic"
        • "error"
        • "information"
        • "warning"
        • "conversion"
        • "proxy"
        • "pcml"
        • "jdbc"
        • "all"
        • "thread"
        The default value is "none". Note: this method is the same as setToolboxTraceCategory() so that it corresponds to the connection property name
      • toString

        public java.lang.String toString()
        Returns the string representation of the object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The string representation.
      • getValidWrappedList

        protected java.lang.String[] getValidWrappedList()