|
Oracle® Mail Java API Reference 10g Release 1 (10.1.1) B14492-01 |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.mail.sdk.esmail.OracleDBPool
This is a jdbc connection pool used by the javamail service provider. A pool of connections may be created by a calling application. Otherwise the pooled connections are created by default. Internally, the OracleConnectionCache class is used to manage connection pools. The user may choose the type of connection pooling mechanism(fixed, dynamic, fixed return null) by specifying the scheme. To use the defaults, set the values to -1.
Constructor Summary | |
OracleDBPool() |
Method Summary | |
static byte[] |
_doEncrypt(java.lang.String db_password) |
static java.sql.Connection |
getDBConn(DBConnectInfo aConnectInfo) Return a connection from the connection pool. |
static java.sql.Connection |
getDBConn(OESContext usrContext) getDBConn - Overloaded method to use OESContext to return connection from the pool instead of the OESLoginContext. |
static java.sql.Connection |
getDBConn(OESLoginContext usrContext) User method to return connection from pool. |
static void |
initDBPool(OESContext appContext, int max, int min, int incr, int stmtCacheSize, int cacheScheme) initDBPool User method to set connection pool. |
static void |
initDBPool(OESContext appContext, java.lang.String installationName, java.lang.String globalDBName, int max, int min, int incr, int stmtCacheSize, int cacheScheme) User method to set connection pool. |
static void |
initDBPool(OESLoginContext appContext, int max, int min, int incr, int stmtCacheSize, int cacheScheme) User method to set connection pool. |
static void |
initDBPool(java.lang.String key, java.lang.String dbServer, int dbPort, java.lang.String dbUser, java.lang.String db_password, java.lang.String connectString, java.lang.String tnsEntry) initDBPool Read the connpool_min_limit, connpool_max_limit and connpool_increment properties. |
static void |
releaseDBConn(java.sql.Connection dbConn) releaseDBConn - To be used to release a connection back into the pool. |
static void |
setDebug(boolean value) Print debug statements - useful to see connection cache and active connection size. |
static void |
setEncrypt(boolean value) |
static void |
setTiming(boolean value) |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OracleDBPool()
Method Detail |
public static void setDebug(boolean value)
Print debug statements - useful to see connection cache and active connection size.
public static void setEncrypt(boolean value)
public static void setTiming(boolean value)
public static void initDBPool(OESLoginContext appContext, int max, int min, int incr, int stmtCacheSize, int cacheScheme)
User method to set connection pool. The default values for the pool setup are max = 10, min = 1, increment = 1, statement cache size = 20, cache scheme = OracleConnectionCacheImpl.FIXED_WAIT_SCHEME.
Note : To use default values, pass in -1.
appContext
- Application's authenticated OESLoginContextmax
- Connection Pool max limitmin
- Connection Pool min limitincr
- IncrementstmtCache
- Statement cache sizecacheScheme
- OracleConnectionCacheImpl.FIXED_WAIT_SCHEME, OracleConnectionCacheImpl.DYNAMIC_SCHEME, OracleConnectionCacheImpl.FIXED_RETURN_NULL_SCHEMEpublic static void initDBPool(OESContext appContext, java.lang.String installationName, java.lang.String globalDBName, int max, int min, int incr, int stmtCacheSize, int cacheScheme)
User method to set connection pool. The default values for the pool setup are max = 10, min = 1, increment = 1, statement cache size = 20, cache scheme = OracleConnectionCacheImpl.FIXED_WAIT_SCHEME.
Note : To use default values, pass in -1.
appContext
- Application's authenticated OESContextmax
- Connection Pool max limitmin
- Connection Pool min limitincr
- IncrementstmtCache
- Statement cache sizecacheScheme
- OracleConnectionCacheImpl.FIXED_WAIT_SCHEME, OracleConnectionCacheImpl.DYNAMIC_SCHEME, OracleConnectionCacheImpl.FIXED_RETURN_NULL_SCHEMEpublic static java.sql.Connection getDBConn(OESLoginContext usrContext)
usrContext
- An authenticated user's login context.public static void initDBPool(OESContext appContext, int max, int min, int incr, int stmtCacheSize, int cacheScheme)
initDBPool User method to set connection pool. The default values for the pool setup are max = 10, min = 1, increment = 1, statement cache size = 20, cache scheme = OracleConnectionCacheImpl.FIXED_WAIT_SCHEME.
Note: To use default values, pass in -1.
appContext
- Application's authenticated OESContextmax
- Connection Pool max limitmin
- Connection Pool min limitincr
- IncrementstmtCache
- Statement cache sizecacheScheme
- OracleConnectionCacheImpl.FIXED_WAIT_SCHEME, OracleConnectionCacheImpl.DYNAMIC_SCHEME, OracleConnectionCacheImpl.FIXED_RETURN_NULL_SCHEMEpublic static java.sql.Connection getDBConn(OESContext usrContext)
getDBConn - Overloaded method to use OESContext to return connection from the pool instead of the OESLoginContext.
OESContext
- user OESContextpublic static void initDBPool(java.lang.String key, java.lang.String dbServer, int dbPort, java.lang.String dbUser, java.lang.String db_password, java.lang.String connectString, java.lang.String tnsEntry)
initDBPool Read the connpool_min_limit, connpool_max_limit and connpool_increment properties. Otherwise, set default values. This method is for internal api(s) only and may not be supported in subsequent releases.
public static java.sql.Connection getDBConn(DBConnectInfo aConnectInfo)
Return a connection from the connection pool. The key and connect string is used to obtain a connection from the connection pool.
public static void releaseDBConn(java.sql.Connection dbConn)
releaseDBConn - To be used to release a connection back into the pool.
Connection
- connection object to close.public static byte[] _doEncrypt(java.lang.String db_password) throws java.lang.Exception
|
Oracle® Mail Java API Reference 10g Release 1 (10.1.1) B14492-01 |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |