public class AS400JDBCXADataSource extends AS400JDBCDataSource implements javax.sql.XADataSource
This support is only available when connecting to systems running OS/400 V5R1 or later, or IBM i.
The following example creates an AS400JDBCXADataSource object and creates a connection to the database.
// Create an XA data source for making the connection. AS400JDBCXADataSource xaDataSource = new AS400JDBCXADataSource("myAS400"); xaDataSource.setUser("myUser"); xaDataSource.setPassword("myPasswd"); // Get the XAConnection. XAConnection xaConnection = xaDataSource.getXAConnection();
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 and Description |
---|
AS400JDBCXADataSource()
Constructs a default AS400JDBCXADataSource object.
|
AS400JDBCXADataSource(java.lang.String serverName)
Constructs an AS400JDBCXADataSource with the specified serverName.
|
AS400JDBCXADataSource(java.lang.String serverName,
java.lang.String user,
char[] password)
Constructs an AS400JDBCXADataSource with the specified signon information.
|
AS400JDBCXADataSource(java.lang.String serverName,
java.lang.String user,
java.lang.String password)
Constructs an AS400JDBCXADataSource with the specified signon information.
|
AS400JDBCXADataSource(java.lang.String serverName,
java.lang.String user,
java.lang.String password,
java.lang.String keyRingNameX,
java.lang.String keyRingPasswordX)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
javax.naming.Reference |
getReference()
Returns the Reference object for the data source object.
|
javax.sql.XAConnection |
getXAConnection()
Returns an XA connection to IBM i.
|
javax.sql.XAConnection |
getXAConnection(java.lang.String user,
char[] password)
Returns an XA connection to IBM i.
|
javax.sql.XAConnection |
getXAConnection(java.lang.String user,
java.lang.String password)
Returns an XA connection to IBM i.
|
addPropertyChangeListener, clone, getAccess, getAffinityFailbackInterval, getBehaviorOverride, getBidiStringType, getBlockCriteria, getBlockSize, getCharacterTruncation, getClientRerouteAlternatePortNumber, getClientRerouteAlternateServerName, getConcurrentAccessResolution, 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, 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, getValidWrappedList, 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, 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, setTcpNoDelay, setThreadUsed, setTimeFormat, setTimeSeparator, setTimestampFormat, setToolboxTrace, setToolboxTraceCategory, setTrace, setTransactionIsolation, setTranslateBinary, setTranslateBoolean, setTranslateHex, setTrueAutocommit, setTrueAutoCommit, setUseBlockUpdate, setUseDrdaMetadataVersion, setUser, setVariableFieldCompression, setVariableFieldCompression, setXALooselyCoupledSupport, toString
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public AS400JDBCXADataSource()
public AS400JDBCXADataSource(java.lang.String serverName)
serverName
- The name of the IBM i system.public AS400JDBCXADataSource(java.lang.String serverName, java.lang.String user, java.lang.String password)
serverName
- The name of the IBM i system.user
- The user id.password
- The password.public AS400JDBCXADataSource(java.lang.String serverName, java.lang.String user, char[] password)
serverName
- The name of the IBM i system.user
- The user id.password
- The password.public AS400JDBCXADataSource(java.lang.String serverName, java.lang.String user, java.lang.String password, java.lang.String keyRingNameX, java.lang.String keyRingPasswordX)
serverName
- The name of the IBM i system.user
- The user id.password
- The password.keyRingNameX
- Not used.keyRingPasswordX
- Not usedpublic javax.sql.XAConnection getXAConnection() throws java.sql.SQLException
getXAConnection
in interface javax.sql.XADataSource
java.sql.SQLException
- If a database error occurs.public javax.sql.XAConnection getXAConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException
getXAConnection
in interface javax.sql.XADataSource
user
- The userid for the connection.password
- The password for the connection.java.sql.SQLException
- If a database error occurs.public javax.sql.XAConnection getXAConnection(java.lang.String user, char[] password) throws java.sql.SQLException
user
- The userid for the connection.password
- The password for the connection.java.sql.SQLException
- If a database error occurs.public javax.naming.Reference getReference() throws javax.naming.NamingException
getReference
in interface javax.naming.Referenceable
getReference
in class AS400JDBCDataSource
javax.naming.NamingException
- If a naming error occurs resolving the object.