|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.as400.access.AS400JDBCDataSource
com.ibm.as400.access.AS400JDBCXADataSource
public class AS400JDBCXADataSource extends AS400JDBCDataSource implements XADataSource
The AS400JDBCXADataSource class represents a factory for AS400JDBCXAConnection objects.
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();
AS400JDBCXAConnection,
AS400JDBCXAResource,
Serialized Form| Modifier and Type | Field and Description |
|---|
| Constructor and Description |
|---|
AS400JDBCXADataSource()
Constructs a default AS400JDBCXADataSource object. |
AS400JDBCXADataSource(String serverName)
Constructs an AS400JDBCXADataSource with the specified serverName. |
AS400JDBCXADataSource(String serverName,
String user,
String password)
Constructs an AS400JDBCXADataSource with the specified signon information. |
AS400JDBCXADataSource(String serverName,
String user,
String password,
String keyRingName,
String keyRingPassword)
Constructs an AS400JDBCXADataSource with the specified signon information to use for SSL communications with the IBM i system. |
| Modifier and Type | Method and Description |
|---|---|
Reference |
getReference()
Returns the Reference object for the data source object. |
XAConnection |
getXAConnection()
Returns an XA connection to IBM i. |
XAConnection |
getXAConnection(String user,
String password)
Returns an XA connection to IBM i. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.sql.CommonDataSource |
|---|
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
| Methods inherited from interface java.sql.Wrapper |
|---|
isWrapperFor, unwrap |
| Constructor Detail |
|---|
public AS400JDBCXADataSource()
public AS400JDBCXADataSource(String serverName)
serverName - The name of the IBM i system.
public AS400JDBCXADataSource(String serverName,
String user,
String password)
serverName - The name of the IBM i system.user - The user id.password - The password.
public AS400JDBCXADataSource(String serverName,
String user,
String password,
String keyRingName,
String keyRingPassword)
serverName - The name of the IBM i system.user - The user id.password - The password.keyRingName - The key ring class name to be used for SSL communications with the system.keyRingPassword - The password for the key ring class to be used for SSL communications with the system.| Method Detail |
|---|
public XAConnection getXAConnection()
throws SQLException
getXAConnection in interface XADataSourceSQLException - If a database error occurs.
public XAConnection getXAConnection(String user,
String password)
throws SQLException
getXAConnection in interface XADataSourceuser - 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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||