|
||||||||||
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 bea.jolt.pool.servlet.ServletSessionPool
This class provides a session pool for use in a Java servlet. A session pool represents one or more connections (sessions) to a BEA Tuxedo system. This class provides call methods that accept input parameters for a BEA Tuxedo service as a javax.servlet.http.HttpServletRequest object.
Refer to the base class SessionPool for information about session pools in general.
Method Summary | |
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. |
Methods inherited from class bea.jolt.pool.SessionPool |
call, getAppAddr, getConnection, getFailOverAddr, getMaxConnections, getMinConn, getPoolName, getSecurityContextClass, getUser, isKeepAlive, isSuspended, propagateSecurityContext, setKeepAlive, setMaxConnections, startTransaction |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
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 object
SessionPoolException
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.
tran
- Transaction object, or null if no transaction
SessionPoolException
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |