|
Business Components | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--oracle.jbo.common.ampool.SessionCookieImpl
Default SessionCookie implementation.
Default session cookie instances should only be instantiated by an
application pool. This is required because the default session cookie
uses the application pool framework to manage application state
and to share application module instances between requests. Please see
ApplicationPool.createSessionCookie(String, String, Properties)
for more information about creating session cookies.
The default implementation uses a session cookie lock to prevent access to the session cookie application module resource by multiple threads. A lock is obtained when a thread invokes useApplicationModule. The lock is released when the thread invokes releaseApplicationModule.
Please see SessionCookie for more
information about session cookies.
| Fields inherited from interface oracle.jbo.common.ampool.SessionCookie |
NULL_PASSIVATION_ID |
| Constructor Summary |
SessionCookieImpl(java.lang.String applicationId,
java.lang.String sessionId,
ApplicationPool pool)
Constructor. |
| Method Summary |
| Type | Method |
|---|---|
void |
copyInto(SessionCookie cookie)
Copies the state of this cookie into the target cookie. |
boolean |
equals(java.lang.Object obj)
Session cookies are equal if their application and session identifiers are equal |
java.lang.String |
getApplicationId()
Returns the application id for this session cookie. |
EnvInfoProvider |
getEnvInfoProvider()
|
java.util.Hashtable |
getEnvironment()
Returns the session environment. |
java.util.Date |
getLastUpdate()
Returns a date value indicating the last time the state of this cookie was updated. |
int |
getPassivationId()
Return an identifier for the last persisted session application state. |
long |
getPoolSignature()
Returns the signature of the pool for which this session cookie is a handle. |
protected boolean |
getProperty(java.lang.String name,
java.util.Hashtable environment,
boolean defaultValue)
|
int |
getReservedPassivationId()
Return the identifier that will be used to persist the session application state at the end of the request. |
java.lang.String |
getSessionId()
Returns the session identifier. |
java.lang.Object |
getSyncLock()
INTERNAL USE ONLY. |
java.util.Hashtable |
getUserData()
Returns a HashTable which may be used to store user specific context that is related to this application session. |
java.lang.String |
getValue()
Returns the session cookie value. |
int |
hashCode()
|
boolean |
isActivationRequired()
Indicates that state activation is required upon the next checkout for this session. |
boolean |
isApplicationModuleReserved()
Tests if the application module that is referenced by this session cookie has been reserved for exclusive access by this session cookie. |
boolean |
isConnectionPoolingEnabled()
Indicates that the session application module resource's JDBC connection should be released immediately upon release to the application pool. |
boolean |
isFailoverEnabled()
Indicates that session application module state should be persisted to secondary storage immediately upon a managed release. |
boolean |
isResetNonTransactionalState()
Indicates whether or not the non-transactional state of the session application module resource should be preserved upon an unmanaged release to the application pool. |
static int |
parsePassivationId(java.lang.String cookieValue)
|
static java.lang.String |
parseSessionId(java.lang.String cookieValue)
|
java.lang.String |
readValue(java.lang.Object source)
Read the cookie value to the specified data sink. |
void |
releaseApplicationModule(boolean checkin,
boolean manageState)
The default implementation will release the session cookie lock after having checked in the session application module. |
void |
releaseApplicationModule(boolean checkin,
boolean manageState,
long waitTimeout)
The default implementation will release the session cookie lock after having checked in the session application module. |
void |
reservePassivationId()
Reserves a unique identifier for the session application. |
void |
resetState()
Reset the mutable state of the session cookie. |
void |
setActivationRequired(boolean activationRequired)
May be used to force activation upon the next checkout for this session. |
void |
setEnvInfoProvider(EnvInfoProvider envInfo)
|
void |
setEnvironment(java.util.Hashtable environment)
Sets the session environment. |
void |
setPassivationId(int passivationId)
Sets the identifier for the last persisted session application state. |
void |
setReservedPassivationId(int reservedPassivationId)
Set the identifier that will be used to persist the session application state. |
void |
setSessionCookieListener(SessionCookieListener listener)
Set a session cookie listener on the cookie. |
void |
timeout()
Internal use only. |
java.lang.String |
toString()
|
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)
The default implementation must obtain a session cookie lock before checking an application module instance out from the pool. |
void |
writeValue(java.lang.Object sink)
Write the cookie value to the specified data sink. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SessionCookieImpl(java.lang.String applicationId,
java.lang.String sessionId,
ApplicationPool pool)
Applications should not invoke this constructor directly. A session cookie factory should be used instead.
The implementation requires that all three parameters be not null.
applicationId - a unique identifier for the session applicationsessionId - a unique identifer for the sessionpool - an application pool instancetimeout - the amount of
time a thread should wait for an application module resource| Method Detail |
public EnvInfoProvider getEnvInfoProvider()
getEnvInfoProvider in interface SessionCookiepublic void setEnvInfoProvider(EnvInfoProvider envInfo)
setEnvInfoProvider in interface SessionCookiepublic java.util.Date getLastUpdate()
SessionCookiegetLastUpdate in interface SessionCookiepublic java.lang.String toString()
toString in interface SessionCookietoString
in class java.lang.Objectpublic int hashCode()
hashCode in interface SessionCookiehashCode
in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in interface SessionCookieequals
in class java.lang.Objectpublic long getPoolSignature()
SessionCookiegetPoolSignature in interface SessionCookiepublic java.lang.String getApplicationId()
SessionCookiegetApplicationId in interface SessionCookiepublic java.lang.String getSessionId()
SessionCookieSession identifers should be uniques across sessions and consistent across servers.
getSessionId in interface SessionCookiepublic java.lang.String getValue()
SessionCookieSession cookie values represent the session application state.
getValue in interface SessionCookiepublic java.util.Hashtable getEnvironment()
SessionCookiegetEnvironment in interface SessionCookiepublic void setEnvironment(java.util.Hashtable environment)
SessionCookiesetEnvironment in interface SessionCookiepublic boolean isApplicationModuleReserved()
ApplicationModuleRefisApplicationModuleReserved in interface ApplicationModuleReforacle.jbo.common.ampool.ApplicationModuleRefpublic ApplicationModule useApplicationModule()
ApplicationModuleRefuseApplicationModule in interface ApplicationModuleReforacle.jbo.common.ampool.ApplicationModuleRefApplicationModuleRef.useApplicationModule(boolean, long)public ApplicationModule useApplicationModule(boolean lock)
ApplicationModuleRefuseApplicationModule in interface ApplicationModuleReforacle.jbo.common.ampool.ApplicationModuleReflock - specify whether a session lock should be acquired for the
shared application module resourceApplicationModuleRef.useApplicationModule(boolean, long)
public ApplicationModule useApplicationModule(boolean lock,
long waitTimeout)
useApplicationModule in interface ApplicationModuleReforacle.jbo.common.ampool.ApplicationModuleReflock - 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 timeout()
public void releaseApplicationModule(boolean checkin,
boolean manageState)
releaseApplicationModule in interface ApplicationModuleReforacle.jbo.common.ampool.ApplicationModuleRefcheckin - manageState - manage the session application state between requests
public void releaseApplicationModule(boolean checkin,
boolean manageState,
long waitTimeout)
releaseApplicationModule in interface ApplicationModuleReforacle.jbo.common.ampool.ApplicationModuleRefcheckin - manageState - manage the session application state between requestswaitTimeout - specifies the amount of time in milliseconds that the
thread should wait for the session cookie lockpublic void writeValue(java.lang.Object sink)
SessionCookiewriteValue in interface SessionCookieoracle.jbo.common.ampool.SessionCookiesink - a data sinkpublic java.lang.String readValue(java.lang.Object source)
SessionCookiereadValue in interface SessionCookieoracle.jbo.common.ampool.SessionCookiesource - a data sourcepublic java.lang.Object getSyncLock()
SessionCookiegetSyncLock in interface SessionCookiepublic boolean isActivationRequired()
SessionCookieisActivationRequired in interface SessionCookiepublic void setActivationRequired(boolean activationRequired)
SessionCookiesetActivationRequired in interface SessionCookiepublic int getPassivationId()
SessionCookiegetPassivationId in interface SessionCookiepublic void setPassivationId(int passivationId)
SessionCookiesetPassivationId in interface SessionCookiepublic void reservePassivationId()
SessionCookieA passivation id should not be reserved if one has already been reserved, if the session cookie does not reference a reserved application module, or if failover is disabled.
reservePassivationId in interface SessionCookieoracle.jbo.common.ampool.SessionCookieSessionCookie.getReservedPassivationId()public int getReservedPassivationId()
SessionCookieThe next passivation id should be used when generating the session cookie value.
getReservedPassivationId in interface SessionCookiepublic void setReservedPassivationId(int reservedPassivationId)
SessionCookiesetReservedPassivationId in interface SessionCookiepublic java.util.Hashtable getUserData()
SessionCookiegetUserData in interface SessionCookiepublic void resetState()
SessionCookieresetState in interface SessionCookiepublic void copyInto(SessionCookie cookie)
SessionCookiecopyInto in interface SessionCookieoracle.jbo.common.ampool.SessionCookiecookie - the target of the copy.public boolean isFailoverEnabled()
SessionCookieSession cookie developers should be careful that this value not change after a session cookie has become active.
isFailoverEnabled in interface SessionCookiepublic boolean isConnectionPoolingEnabled()
SessionCookieSession cookie developers should be careful that this value not change after a session cookie has become active.
isConnectionPoolingEnabled in interface SessionCookiepublic boolean isResetNonTransactionalState()
SessionCookieTransactional state includes the state of the transaction caches (EO and VO) and database state. Non-transactional state includes child view usage and application module usage instances and their related state including dynamic where clauses, order by clauses, and bind parameters. If connection pooling has been disabled for the application pool then non-transaction state will also include any cached JDBC statements.
isResetNonTransactionalState in interface SessionCookie
protected boolean getProperty(java.lang.String name,
java.util.Hashtable environment,
boolean defaultValue)
public void setSessionCookieListener(SessionCookieListener listener)
SessionCookiesetSessionCookieListener in interface SessionCookiepublic static java.lang.String parseSessionId(java.lang.String cookieValue)
public static int parsePassivationId(java.lang.String cookieValue)
|
Business Components | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||