|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Dictionary java.util.Hashtable bea.jolt.pool.SessionPoolManager
This class manages a collection of one or more session pools. It provides methods that are used to configure both the session pool manager and the session pools that it contains. These methods are part of the administrative API for a session pool. When session pools are being used with the BEA WebLogic Application Server, configuration is done via the BEA WebLogic management console. A user does not need to access the adminstrative API directly. Refer to the BEA WebLogic Administrators Guide for information on configuring a session pool manager in a BEA WebLogic environment.
The getSessionPool method is used to locate a session pool. This method is not part of the administrative API, it is used to submit a request to a BEA Tuxedo system.
A session pool is a set of connections to a BEA Tuxedo system. Each session pool is assigned a name when it is created; this name is used to identify each session pool in the SessionPoolManager. The SessionPoolManager allows one unnamed session pool to be created. This unnamed pool is assigned a default internal name, and can be accessed by using a null value for name. If there is only one session pool in the SessionPoolManager, this provides a convenient way to access it.
The following list shows a typical life-cycle of a SessionPoolManager:
There is generally no need to have more than one instance of a SessionPoolManager per application.
Field Summary | |
static SessionPoolManager |
poolmgr
|
java.lang.String |
poolName
When session pools are being used with the BEA WebLogic Application Server, the session pool manager is created at startup. |
static java.lang.String |
VERSION
|
Constructor Summary | |
SessionPoolManager()
Creates a default SessionPoolManager object with an initial capacity of 10. |
Method Summary | |
int |
createSession(java.lang.String[] addrs,
UserInfo usr,
java.lang.String id)
This method is part of the SessionPool administrative API. |
int |
createSessionPool(java.lang.String[] addrs,
java.lang.String[] saddrs,
int minCons,
int maxCons,
UserInfo usr,
java.lang.String id)
This method is part of the session pool administrative API. |
int |
createSessionPool(java.lang.String[] addrs,
java.lang.String[] saddrs,
int minCons,
int maxCons,
UserInfo usr,
java.lang.String id,
boolean propagateSecurityCtxt,
SecurityContext SecurityContextClass)
This method is for internal use only. |
void |
done()
This method is part of the session pool administrative API. |
SessionPool |
getSessionPool(java.lang.String id)
Returns a named session pool. |
void |
removeSessionPool(java.lang.String id)
This method is part of the session pool administrative API. |
void |
stopSessionPool(java.lang.String id)
This method is part of the session pool administrative API. |
void |
suspendSessionPool(java.lang.String id,
boolean action)
This method is part of the session pool administrative API. |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, remove, size, toString, values |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public java.lang.String poolName
The following code retrieves the session pool manager:
SessionPoolManager mgr; try { mgr = SessionPoolManager.poolmgr; }
public static SessionPoolManager poolmgr
public static final java.lang.String VERSION
Constructor Detail |
public SessionPoolManager()
Method Detail |
public final void done()
stopSessionPool(java.lang.String)
,
suspendSessionPool(java.lang.String, boolean)
,
removeSessionPool(java.lang.String)
public final int createSessionPool(java.lang.String[] addrs, java.lang.String[] saddrs, int minCons, int maxCons, UserInfo usr, java.lang.String id)
A session pool is a set of connections to a BEA Tuxedo system. The array addrs is a list of primary machine names and ports used to create the connections. The array saddrs is a list of secondary machine names and ports. If any connections to the primary machines fail, the session pool attempts to reconnect using the secondary list of addresses. The parameters minCons and maxCons represent the minimum and maximum number of connections to be established in the session pool. When the session pool is created, minCons connections are established. As load increases, the number of connections are increased up to maxCons. The usr parameter contains information such as the user name and the password that is used to connect to a BEA Tuxedo system. If no BEA Tuxedo authentication is required, this parameter should be null. The session pool is identified by id. If id is null, a default name is used to identify the session pool; to access this default session pool, always specify null as the id.
There can only be one session pool with a given name (including the default) at any time. Multiple calls to this method with the same id cause the existing session pool named id to be discarded by the session pool manager and replaced with a new session pool named id. The behavior of the original session pool is non-deterministic; the pool should not be used. All references to the original session pool should be discarded.
This method returns the number of successful connections. This should be the same as minCons.
addrs
- List of primary server addressessaddrs
- List of secondary server addresses for failoverminCons
- Minimum number of connections to start withmaxCons
- Maximum number of connections in this poolusr
- BEA Tuxedo authentication information, or nullid
- ID to identify the session pool, or
null for default session pool
getSessionPool(java.lang.String)
public final int createSessionPool(java.lang.String[] addrs, java.lang.String[] saddrs, int minCons, int maxCons, UserInfo usr, java.lang.String id, boolean propagateSecurityCtxt, SecurityContext SecurityContextClass)
public final int createSession(java.lang.String[] addrs, UserInfo usr, java.lang.String id)
This method should not be documented.
addrs
- List of server addressesusr
- BEA Tuxedo authentication information, or nullid
- Unique client id specified by the caller
public final void suspendSessionPool(java.lang.String id, boolean action)
id
- ID to identify the session pool, or
null for default session poolaction
- True to suspend the session pool, false to
resume it.createSessionPool(java.lang.String[], java.lang.String[], int, int, bea.jolt.pool.UserInfo, java.lang.String)
,
stopSessionPool(java.lang.String)
,
removeSessionPool(java.lang.String)
,
done()
public final void stopSessionPool(java.lang.String id)
id
- ID to identify the session pool, or null for
default session poolcreateSessionPool(java.lang.String[], java.lang.String[], int, int, bea.jolt.pool.UserInfo, java.lang.String)
,
suspendSessionPool(java.lang.String, boolean)
,
removeSessionPool(java.lang.String)
,
done()
public final void removeSessionPool(java.lang.String id)
id
- ID to identify the session pool, or null for
default session poolcreateSessionPool(java.lang.String[], java.lang.String[], int, int, bea.jolt.pool.UserInfo, java.lang.String)
,
suspendSessionPool(java.lang.String, boolean)
,
stopSessionPool(java.lang.String)
,
done()
public final SessionPool getSessionPool(java.lang.String id)
id
- ID that identifies the session pool, or null
for the default session pool
createSessionPool(java.lang.String[], java.lang.String[], int, int, bea.jolt.pool.UserInfo, java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |