|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | 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.
Constructor Summary | |
protected |
SessionPool(java.lang.String[] addrs,
java.lang.String[] saddrs,
int minCons,
int maxCons,
UserInfo usr,
boolean keepAlive)
Creates a session pool with multiple connections to the BEA Jolt servers. |
Method Summary | |
Result |
call(java.lang.String svcname,
DataSet input,
Transaction tran)
Invokes a BEA TUXEDO service. |
protected Result |
call(java.lang.String svcname,
java.lang.String[] input,
Transaction tran)
Invokes a BEA TUXEDO service. |
Connection |
getConnection(int index)
This method is part of the session pool administrative API. |
protected bea.jolt.JoltDefinition |
getDefinition(java.lang.String name)
Gets a service definition. |
int |
getMaxConnections()
This method is part of the session pool administrative API. |
boolean |
isSuspended()
This method is part of the session pool administrative API. |
protected void |
log(java.lang.String msg)
Logs an error message. |
protected DataSet |
newDataSet(int initCapacity,
boolean flag)
A default factory for the DataSet. |
protected Result |
newResult(int initCapacity)
A default factory for the Result. |
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 bea.jolt.pool.Factory |
useException |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
protected SessionPool(java.lang.String[] addrs, java.lang.String[] saddrs, int minCons, int maxCons, UserInfo usr, boolean keepAlive)
addrs
- List of server addressessaddrs
- List of secondary server addresses for failoverminCons
- Minimum number of connectionsmaxCons
- Maximum number of connectionsusr
- User authenication info, or nullkeepalive
- true to keep the session aliveMethod Detail |
protected Result call(java.lang.String svcname, java.lang.String[] 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 to this method. If this service is not part of a transaction this parameter should be null.
If the session pool is suspended or if no connections are available, this method throws a SessionPoolException.
svcname
- Name of the BEA TUXEDO service to be invokedinput
- String[] of name=value pairs, or null
if no input parameterstran
- A Transaction object, or null if no transactioncall(java.lang.String, bea.jolt.pool.DataSet,
bea.jolt.pool.Transaction)
,
startTransaction(int)
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 transactionServletSessionPool.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 secondscall(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 sizepublic int getMaxConnections()
public boolean isSuspended()
SessionPoolManager.suspendSessionPool(java.lang.String,
boolean)
public Connection getConnection(int index)
index
- A connection indexprotected bea.jolt.JoltDefinition getDefinition(java.lang.String name)
name
- Service nameprotected DataSet newDataSet(int initCapacity, boolean flag)
protected Result newResult(int initCapacity)
protected void log(java.lang.String msg)
msg
- Error message to be logged
|
Documentation is available at http://www.weblogic.com/docs51 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |