|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.ibm.as400.access.AS400JDBCDataSource
|
+--com.ibm.as400.access.AS400JDBCConnectionPoolDataSource
The AS400JDBCConnectionPoolDataSource class represents a factory for AS400PooledConnection objects.
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();
| Field Summary |
| Fields inherited from class com.ibm.as400.access.AS400JDBCDataSource |
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 Summary | |
AS400JDBCConnectionPoolDataSource()
Constructs a default AS400JDBCConnectionPoolDataSource object. |
|
AS400JDBCConnectionPoolDataSource(java.lang.String serverName)
Constructs an AS400JDBCConnectionPoolDataSource with the specified serverName. |
|
AS400JDBCConnectionPoolDataSource(java.lang.String serverName,
java.lang.String user,
java.lang.String password)
Constructs an AS400JDBCConnectionPoolDataSource with the specified signon information. |
|
AS400JDBCConnectionPoolDataSource(java.lang.String serverName,
java.lang.String user,
java.lang.String password,
java.lang.String keyRingName,
java.lang.String keyRingPassword)
Constructs an AS400JDBCConnectionPoolDataSource with the specified signon information to use for SSL communications with the server. |
|
| Method Summary | |
javax.sql.PooledConnection |
getPooledConnection()
Returns a pooled connection that is connected to the server. |
javax.sql.PooledConnection |
getPooledConnection(java.lang.String user,
java.lang.String password)
Returns a pooled connection that is connected to the server. |
javax.naming.Reference |
getReference()
Returns the Reference object for the data source object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.sql.ConnectionPoolDataSource |
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
| Constructor Detail |
public AS400JDBCConnectionPoolDataSource()
public AS400JDBCConnectionPoolDataSource(java.lang.String serverName)
serverName - The name of the iSeries server.
public AS400JDBCConnectionPoolDataSource(java.lang.String serverName,
java.lang.String user,
java.lang.String password)
serverName - The iSeries system name.user - The user id.password - The password.
public AS400JDBCConnectionPoolDataSource(java.lang.String serverName,
java.lang.String user,
java.lang.String password,
java.lang.String keyRingName,
java.lang.String keyRingPassword)
serverName - The iSeries system name.user - The user id.password - The password.keyRingName - The key ring class name to be used for SSL communications with the server.keyRingPassword - The password for the key ring class to be used for SSL communications with the server.| Method Detail |
public javax.sql.PooledConnection getPooledConnection()
throws java.sql.SQLException
getPooledConnection in interface javax.sql.ConnectionPoolDataSourcejava.sql.SQLException - If a database error occurs.
public javax.sql.PooledConnection getPooledConnection(java.lang.String user,
java.lang.String password)
throws java.sql.SQLException
getPooledConnection in interface javax.sql.ConnectionPoolDataSourceuser - 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.ReferenceablegetReference in class AS400JDBCDataSourcejavax.naming.NamingException - If a naming error occurs resolving the object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||