public class ServletSessionPool extends SessionPool
Refer to the base class SessionPool for information about session pools in general.
NATIVE_SESSION_POOL, OTHER_SESSION_POOL, SERVLET_SESSION_POOL
Modifier and Type | Method and Description |
---|---|
ServletResult |
call(java.lang.String name,
javax.servlet.http.HttpServletRequest request)
Invokes a BEA Tuxedo service without an explicit transaction.
|
ServletResult |
call(java.lang.String name,
javax.servlet.http.HttpServletRequest request,
Transaction tran)
Invokes a BEA Tuxedo service.
|
call, getAppAddr, getConnection, getFailOverAddr, getMaxConnections, getMinConn, getPoolName, getSecurityContextClass, getSessionPoolType, getUser, isKeepAlive, isSuspended, propagateSecurityContext, setKeepAlive, setMaxConnections, setSessionPoolType, startTransaction
public ServletResult call(java.lang.String name, javax.servlet.http.HttpServletRequest request) throws SessionPoolException, ApplicationException, ServiceException, TransactionException
To represent BEA Tuxedo parameters with multiple occurrences, the name of a form field should have "_<index>" appended to it. Note that index numbers start at 0 (zero), so the first occurrence is represented by index 0 (zero). To indicate the first and second occurrences of a service parameter named "ACCOUNT_ID", sample HTML form fields could be written as follows:
<FORM ACTION=myservlet METHOD=POST> ... <INPUT TYPE=TEXT NAME=ACCOUNT_ID_0> <INPUT TYPE=TEXT NAME=ACCOUNT_ID_1> ... </FORM>
If the session pool is suspended or if no connections are available, this method throws a SessionPoolException.
Specific exceptions are thrown to indicate error conditions. If an application error occurs, this method throws an ApplicationException. The return from the getResult method on ApplicationException can be cast to ServletResult, as below:
// Assume ServletSessionPool (pool) has been initialized, and // request is a HttpServletRequest try { pool.call ("MY_SERVICE", request); } catch (ApplicationException e) { // Get the ServletResult ServletResult result = (ServletResult) e.getResult(); // Access application data in result out.println("Application code is " + result.getApplicationCode()); ... } catch ... // Handle other exceptions ... }
name
- Name of the BEA Tuxedo service to callrequest
- HttpServletRequest objectSessionPoolException
ApplicationException
ServiceException
TransactionException
call(java.lang.String, javax.servlet.http.HttpServletRequest,
bea.jolt.pool.Transaction)
,
SessionPool.call(java.lang.String, bea.jolt.pool.DataSet,
bea.jolt.pool.Transaction)
public ServletResult call(java.lang.String name, javax.servlet.http.HttpServletRequest request, Transaction tran) throws SessionPoolException, ApplicationException, ServiceException, TransactionException
To represent BEA Tuxedo parameters with multiple occurrences, the name of a member should have "_<index>" appended to it. Note that index numbers start at zero, so the first occurrence is represented by index zero (0). To indicate the first and second occurrences of a parameter named "ACCOUNT_ID", the member names should be "ACCOUNT_ID_0" and "ACCOUNT_ID_1" respectively.
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
- DataSet containing BEA Tuxedo service parameters,
or null if no input parameterstran
- Transaction object, or null if no transactionSessionPoolException
ApplicationException
ServiceException
TransactionException
call(java.lang.String, javax.servlet.http.HttpServletRequest)
,
SessionPool.call(java.lang.String, bea.jolt.pool.DataSet,
bea.jolt.pool.Transaction)
,
SessionPool.startTransaction(int)