Serializable, Cloneable, Wrapper, Referenceable, CommonDataSource, ConnectionPoolDataSource, DataSourcepublic class AS400JDBCConnectionPoolDataSource extends AS400JDBCDataSource implements ConnectionPoolDataSource, Referenceable, Serializable
The following is an example that creates an AS400JDBCConnectionPoolDataSource object that can be used to cache JDBC connections.
// Create a data source for making the connection.
AS400JDBCConnectionPoolDataSource dataSource = new AS400JDBCConnectionPoolDataSource("myAS400");
datasource.setUser("myUser");
datasource.setPassword("MYPWD");
// Get the PooledConnection.
PooledConnection pooledConnection = datasource.getPooledConnection();
CONCURRENTACCESS_NOT_SET, CONCURRENTACCESS_SKIP_LOCKS, CONCURRENTACCESS_USE_CURRENTLY_COMMITTED, CONCURRENTACCESS_WAIT_FOR_OUTCOME, MAX_STORAGE_LIMIT, SERVER_TRACE_DEBUG_SERVER_JOB, SERVER_TRACE_SAVE_SERVER_JOBLOG, SERVER_TRACE_SAVE_SQL_INFORMATION, SERVER_TRACE_START_DATABASE_MONITOR, SERVER_TRACE_TRACE_SERVER_JOB| Constructor | Description |
|---|---|
AS400JDBCConnectionPoolDataSource() |
Constructs a default AS400JDBCConnectionPoolDataSource object.
|
AS400JDBCConnectionPoolDataSource(AS400 as400) |
|
AS400JDBCConnectionPoolDataSource(String serverName) |
Constructs an AS400JDBCConnectionPoolDataSource with the specified serverName.
|
AS400JDBCConnectionPoolDataSource(String serverName,
String user,
char[] password) |
Constructs an AS400JDBCConnectionPoolDataSource with the specified signon information.
|
AS400JDBCConnectionPoolDataSource(String serverName,
String user,
String password) |
Deprecated.
Use AS400JDBCConnectionPoolDataSource(String serverName, String user, char[] password) instead.
|
AS400JDBCConnectionPoolDataSource(String serverName,
String user,
String password,
String keyRingNameX,
String keyRingPasswordX) |
Deprecated.
-- keyrings are not supported.
|
| Modifier and Type | Method | Description |
|---|---|---|
PooledConnection |
getPooledConnection() |
Returns a pooled connection that is connected to the IBM i system.
|
PooledConnection |
getPooledConnection(String user,
char[] password) |
Returns a pooled connection that is connected to the IBM i system.
|
PooledConnection |
getPooledConnection(String user,
String password) |
Deprecated.
Use getPooledConnection(String user, char[] password) instead.
|
Reference |
getReference() |
Returns the Reference object for the data source object.
|
protected String[] |
getValidWrappedList() |
|
boolean |
isWrapperFor(Class<?> iface) |
Returns true if this either implements the interface argument or is
directly or indirectly a wrapper for an object that does.
|
<T> T |
unwrap(Class<T> iface) |
Returns an object that implements the given interface to allow access to
non-standard methods, or standard methods not exposed by the proxy.
|
addPropertyChangeListener, clone, getAccess, getAffinityFailbackInterval, getBehaviorOverride, getBidiStringType, getBlockCriteria, getBlockSize, getCharacterTruncation, getClientRerouteAlternatePortNumber, getClientRerouteAlternateServerName, getConcurrentAccessResolution, getConnection, getConnection, getConnection, getConnection, getCursorSensitivity, getDatabaseName, getDataSourceName, getDateFormat, getDateSeparator, getDecfloatRoundingMode, getDecimalDataErrors, getDecimalSeparator, getDescribeOption, getDescription, getDriver, getEnableClientAffinitiesList, getEnableSeamlessFailover, getErrors, getIgnoreWarnings, getKeepAlive, getLibraries, getLobThreshold, getLoginTimeout, getLogWriter, getMaximumBlockedInputRows, getMaximumPrecision, getMaximumScale, getMaxRetriesForClientReroute, getMetadataSource, getMetaDataSource, getMinimumDivideScale, getNaming, getNumericRangeError, getPackage, getPackageCcsid, getPackageCCSID, getPackageCriteria, getPackageError, getPackageLibrary, getParentLogger, getPortNumber, getProxyServer, getQaqqinilib, getQaqqiniLibrary, getQueryOptimizeGoal, getQueryReplaceTruncatedParameter, getQueryStorageLimit, getQueryTimeoutMechanism, getReceiveBufferSize, getRemarks, getRetryIntervalForClientReroute, getSecondaryUrl, getSecondaryURL, getSendBufferSize, getServerName, getServerTrace, getServerTraceCategories, getSocketTimeout, getSoLinger, getSort, getSortLanguage, getSortTable, getSortWeight, getSoTimeout, getTcpNoDelay, getTimeFormat, getTimeSeparator, getTimestampFormat, getToolboxTrace, getToolboxTraceCategory, getTransactionIsolation, getTranslateHex, getUser, getVariableFieldCompression, getXALooselyCoupledSupport, isAutoCommit, isAutocommitException, isBidiImplicitReordering, isBidiNumericOrdering, isBigDecimal, isCursorHold, isDataCompression, isDataTruncation, isExtendedDynamic, isExtendedMetadata, isExtendedMetaData, isFullOpen, isHoldInputLocators, isHoldStatements, isJvm16Synchronize, isKeepAlive, isLazyClose, isPackageAdd, isPackageCache, isPackageClear, isPrefetch, isPrompt, isRollbackCursorHold, isSavePasswordWhenSerialized, isSecure, isSecureCurrentUser, isTcpNoDelay, isThreadUsed, isTrace, isTranslateBinary, isTranslateBoolean, isTrueAutocommit, isTrueAutoCommit, isUseBlockUpdate, isUseDrdaMetadataVersion, isVariableFieldCompression, removePropertyChangeListener, setAccess, setAdditionalAuthenticationFactor, setAffinityFailbackInterval, setAutoCommit, setAutocommitException, setBehaviorOverride, setBidiImplicitReordering, setBidiNumericOrdering, setBidiStringType, setBigDecimal, setBlockCriteria, setBlockSize, setCharacterTruncation, setClientRerouteAlternatePortNumber, setClientRerouteAlternateServerName, setConcurrentAccessResolution, setCursorHold, setCursorSensitivity, setDatabaseName, setDataCompression, setDataSourceName, setDataTruncation, setDateFormat, setDateSeparator, setDecfloatRoundingMode, setDecimalDataErrors, setDecimalSeparator, setDescribeOption, setDescription, setDriver, setEnableClientAffinitiesList, setEnableSeamlessFailover, setErrors, setExtendedDynamic, setExtendedMetadata, setExtendedMetaData, setFullOpen, setHoldInputLocators, setHoldStatements, setIgnoreWarnings, setJvm16Synchronize, setKeepAlive, setLazyClose, setLibraries, setLobThreshold, setLoginTimeout, setLogWriter, setMaximumBlockedInputRows, setMaximumPrecision, setMaximumScale, setMaxRetriesForClientReroute, setMetadataSource, setMetaDataSource, setMinimumDivideScale, setNaming, setNumericRangeError, setPackage, setPackageAdd, setPackageCache, setPackageCcsid, setPackageCCSID, setPackageClear, setPackageCriteria, setPackageError, setPackageLibrary, setPassword, setPassword, setPortNumber, setPrefetch, setPrompt, setProperties, setProperties, setProxyServer, setQaqqinilib, setQaqqiniLibrary, setQueryOptimizeGoal, setQueryReplaceTruncatedParameter, setQueryStorageLimit, setQueryTimeoutMechanism, setReceiveBufferSize, setRemarks, setRetryIntervalForClientReroute, setRollbackCursorHold, setSavePasswordWhenSerialized, setSecondaryUrl, setSecondaryURL, setSecure, setSecureCurrentUser, setSendBufferSize, setServerName, setServerTrace, setServerTraceCategories, setSocketTimeout, setSoLinger, setSort, setSortLanguage, setSortTable, setSortWeight, setSoTimeout, setStayAlive, setTcpNoDelay, setThreadUsed, setTimeFormat, setTimeSeparator, setTimestampFormat, setToolboxTrace, setToolboxTraceCategory, setTrace, setTransactionIsolation, setTranslateBinary, setTranslateBoolean, setTranslateHex, setTrueAutocommit, setTrueAutoCommit, setUseBlockUpdate, setUseDrdaMetadataVersion, setUser, setVariableFieldCompression, setVariableFieldCompression, setXALooselyCoupledSupport, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateShardingKeyBuilder, getParentLoggercreatePooledConnectionBuilder, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWritercreateConnectionBuilderisWrapperFor, unwrappublic AS400JDBCConnectionPoolDataSource()
public AS400JDBCConnectionPoolDataSource(AS400 as400)
public AS400JDBCConnectionPoolDataSource(String serverName)
serverName - The IBM i system name.public AS400JDBCConnectionPoolDataSource(String serverName, String user, String password)
serverName - The IBM i system name.user - The user id.password - The password.public AS400JDBCConnectionPoolDataSource(String serverName, String user, char[] password)
serverName - The IBM i system name.user - The user id.password - The password.public AS400JDBCConnectionPoolDataSource(String serverName, String user, String password, String keyRingNameX, String keyRingPasswordX)
serverName - The IBM i system name.user - The user id.password - The password.keyRingNameX - The key ring class name to be used for SSL communications with the system.keyRingPasswordX - The password for the key ring class to be used for SSL communications with the system.public PooledConnection getPooledConnection() throws SQLException
getPooledConnection in interface ConnectionPoolDataSourceSQLException - If a database error occurs.public PooledConnection getPooledConnection(String user, char[] password) throws SQLException
user - The userid for the connection.password - The password for the connection.SQLException - If a database error occurs.public PooledConnection getPooledConnection(String user, String password) throws SQLException
getPooledConnection in interface ConnectionPoolDataSourceuser - The userid for the connection.password - The password for the connection.SQLException - If a database error occurs.public Reference getReference() throws NamingException
getReference in interface ReferenceablegetReference in class AS400JDBCDataSourceNamingException - If a naming error occurs resolving the object.protected String[] getValidWrappedList()
getValidWrappedList in class AS400JDBCDataSourcepublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor on the wrapped object. If this does not
implement the interface and is not a wrapper, return false. This method
should be implemented as a low-cost operation compared to
unwrap so that callers can use this method to avoid
expensive unwrap calls that may fail. If this method
returns true then calling unwrap with the same argument
should succeed.isWrapperFor in interface Wrapperiface - a Class defining an interface.SQLException - If a database error occurs.
if an error occurs while determining whether this is a
wrapper for an object with the given interface.public <T> T unwrap(Class<T> iface) throws SQLException
unwrap recursively on the wrapped object or a
proxy for that result. If the receiver is not a wrapper and does not
implement the interface, then an SQLException is thrown.unwrap in interface Wrapperiface - A Class defining an interface that the result must implement.SQLException - If a database error occurs.
If no object found that implements the interfaceCopyright © 2024. All rights reserved.