|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Method Summary |
Type | Method |
---|---|
boolean |
isApplicationModuleReserved()
Tests if the application module that is referenced by this session cookie has been reserved for exclusive access by this session cookie. |
void |
releaseApplicationModule(boolean checkin,
boolean manageState)
Release an application module for reuse. |
void |
releaseApplicationModule(boolean checkin,
boolean manageState,
long waitTimeout)
Release an application module for reuse. |
ApplicationModule |
useApplicationModule()
Returns an application module instance without acquiring a session cookie lock. |
ApplicationModule |
useApplicationModule(boolean lock)
Returns an application module instance for the current thread. |
ApplicationModule |
useApplicationModule(boolean lock,
long waitTimeout)
Returns an application module instance for the current thread. |
Method Detail |
public boolean isApplicationModuleReserved()
public ApplicationModule useApplicationModule()
useApplicationModule(boolean, long)
public ApplicationModule useApplicationModule(boolean lock)
lock
- specify whether a session lock should be acquired for the
shared application module resourceuseApplicationModule(boolean, long)
public ApplicationModule useApplicationModule(boolean lock, long waitTimeout)
If the application session cookie references application state the application state should be activated in the returned application module.
The lock parameter may be specified to acquire a lock for the shared application module resource. If a lock is acquired the application should be careful to release that lock after it is done using the application module resource. Application thread starvation may occur if the lock is held indefinitely.
If another thread is holding the lock associated with the session cookie then the current thread will wait for the period specified by the waitTimeout parameter.
Best practice would be to invoke useApplicationModule(boolean)
in a try...finally block that invokes
during finally.
lock
- specify whether a session lock should be acquired for the
shared application module resourcewaitTimeout
- specifies the amount of time in milliseconds that the
thread should wait for the session cookie lockpublic void releaseApplicationModule(boolean checkin, boolean manageState)
This method should be invoked at the end of each session request.
If another thread is holding the lock associated with the session cookie
then the current thread will wait indefinitely. Please see releaseApplicationModule(boolean, boolean, long)
if a wait timeout is desired.
The checkin parameter may be used to indicate that the session application module instance should be checked in for reuse by other sessions.
The manageState parameter may be used to indicate that the session application state should be managed between requests by the pooling framework.
checkin
- manageState
- manage the session application state between requestspublic void releaseApplicationModule(boolean checkin, boolean manageState, long waitTimeout)
This method should be invoked at the end of each session request.
If another thread is holding the lock associated with the session cookie then the current thread will wait for the period specified by the waitTimeout parameter. The current thread may be blocked upon invoking releaseApplicationModule if it did not acquire a session cookie lock when it dereferenced the application module with #useApplicationModule(boolean).
The checkin parameter may be used to indicate that the session application module instance should be checked in for reuse by other sessions.
The manageState parameter may be used to indicate that the session application state should be managed between requests by the pooling framework.
I
checkin
- manageState
- manage the session application state between requestswaitTimeout
- specifies the amount of time in milliseconds that the
thread should wait for the session cookie lock
|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |