|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bea.jolt.pool.Factory bea.jolt.pool.SessionPool
This class represents a session pool that contains one or more connections (sessions) to a BEA Tuxedo system. Service requests are sent to the BEA Tuxedo system via the session pool that distributes requests across its available connections.
This class provides several methods that are part of the session pool administrative API. When using session pools with BEA WebLogic, administration is done via the BEA WebLogic console. A user does not need to access this administrative API directly.
The call and startTransaction methods are not part of the administrative API. They are used to submit requests to a BEA Tuxedo system.
Multiple service requests can be executed in a single transaction. When a transaction starts, the session pool picks the least busy connection and puts it in transactional mode. All service requests associated with that transaction are then sent via the selected connection. The connection associated with the transaction is not available for other requests until the transaction either commits or aborts. The transaction should commit or abort before a response is sent to the client, otherwise the connection does not return to the pool of available connections.
A session pool attempts to reestablish failed connections. When a connection fails, in-process transactions and requests fail and return errors. The session pool only reestablishes connections, it does not resubmit failed requests.
Refer to the BEA WebLogic Administrators Guide for information on configuring a session pool.
Method Summary | |
Result |
call(java.lang.String svcname,
DataSet input,
Transaction tran)
Invokes a BEA Tuxedo service. |
java.lang.String[] |
getAppAddr()
|
Connection |
getConnection(int index)
This method is part of the session pool administrative API. |
java.lang.String[] |
getFailOverAddr()
|
int |
getMaxConnections()
This method is part of the session pool administrative API. |
int |
getMinConn()
|
java.lang.String |
getPoolName()
|
SecurityContext |
getSecurityContextClass()
|
UserInfo |
getUser()
|
boolean |
isKeepAlive()
Check if it is a keep alive session. |
boolean |
isSuspended()
This method is part of the session pool administrative API. |
boolean |
propagateSecurityContext()
|
void |
setKeepAlive(boolean keepAlive)
|
int |
setMaxConnections(int maxCons)
This method is part of the session pool administrative API. |
Transaction |
startTransaction(int timeout)
Starts a transaction. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public Result call(java.lang.String svcname, DataSet input, Transaction tran) throws SessionPoolException, ApplicationException, ServiceException, TransactionException
To invoke multiple services in a transaction, create a Transaction object (see startTransaction()) and pass the Transaction object as the parameter tran. If this service is not part of a transaction tran should be null.
If the session pool is suspended or if no connections are available, this method throws a SessionPoolException.
svcname
- Name of the service to be invokedinput
- DataSet containing service parameters,
or null if no input parameterstran
- Transaction object, or null if no transaction
SessionPoolException
- No connections are available.
ApplicationException
- An application error occurred.
ServiceException
- A system error occurred.
TransactionException
- A transaction error occurred.ServletSessionPool.call(java.lang.String,
javax.servlet.http.HttpServletRequest, bea.jolt.pool.Transaction)
,
ServletSessionPool.call(java.lang.String,
javax.servlet.http.HttpServletRequest)
,
startTransaction(int)
public Transaction startTransaction(int timeout) throws SessionPoolException, TransactionException
timeout
- Transaction time-out value in seconds
SessionPoolException
- No connections are available.
TransactionException
- A transaction error occurred.call(java.lang.String, bea.jolt.pool.DataSet,
bea.jolt.pool.Transaction)
,
ServletSessionPool.call(java.lang.String,
javax.servlet.http.HttpServletRequest, bea.jolt.pool.Transaction)
public int setMaxConnections(int maxCons)
maxCons
- New session pool size
public int getMaxConnections()
public boolean isSuspended()
SessionPoolManager.suspendSessionPool(java.lang.String,
boolean)
public Connection getConnection(int index)
index
- A connection index
public java.lang.String getPoolName()
public java.lang.String[] getAppAddr()
public java.lang.String[] getFailOverAddr()
public int getMinConn()
public UserInfo getUser()
public boolean propagateSecurityContext()
public SecurityContext getSecurityContextClass()
public boolean isKeepAlive()
public void setKeepAlive(boolean keepAlive)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |