|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jdeveloper.html.WebBeanImpl | +--oracle.jbo.html.jsp.JSPApplicationRegistry
This class provides the main interface for DataWebBeans to use the Application Module Pool. View implementation of JSPApplicationRegistry
Field Summary | |
static java.lang.String |
RESERVED
|
static java.lang.String |
STATEFUL
|
static java.lang.String |
STATELESS
|
Fields inherited from class oracle.jdeveloper.html.WebBeanImpl |
application,
ctx,
out,
page,
request,
response,
session |
Constructor Summary | |
JSPApplicationRegistry()
Constructor, this should not be called directly |
Method Summary | |
static ApplicationModule |
getApplication(java.lang.String appName)
Deprecated. As of BC4J 3.2, replaced by getAppModuleInstance(String, HttpServletRequest, HttpSession) |
ApplicationModule |
getAppModuleFromContexts(java.lang.String appName,
javax.servlet.http.HttpSession session,
javax.servlet.jsp.PageContext pageContext)
Check the relevant http contexts for the named application module instance. |
ApplicationModule |
getAppModuleInstance(java.lang.String appName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpSession session)
Get an application module instance for the specified application pool. |
ApplicationModule |
getAppModuleInstance(java.lang.String appName,
javax.servlet.jsp.PageContext pageContext)
Get an application module instance for the specified application pool. |
static java.util.Hashtable |
getAppSettings(java.lang.String appName)
Returns the user data associated with the named pool. |
static oracle.jbo.http.HttpContainer |
getHttpContainer(javax.servlet.http.HttpSession session)
|
static JSPApplicationRegistry |
getInstance()
Returns the singleton instance of the registry class. |
java.lang.String |
getReleaseMode(java.lang.String appName)
Helper method to obtain the specified application's release mode. |
protected java.lang.String |
readSessionId(javax.servlet.http.HttpServletRequest request,
java.lang.String applicationName)
Read the session id from the HttpServletRequest. |
static void |
registerApplicationFromPropertyFile(javax.servlet.http.HttpSession session,
java.lang.String sPropFileName)
Convenience method for defining a new application pool from a property file. |
static void |
registerApplicationFromPropertyFile(java.lang.String sPropFileName)
Creates a new application pool from the contents of a property file. |
void |
releaseAppModuleInstance(ApplicationModule appModule,
ApplicationPool pool,
javax.servlet.http.HttpSession session,
javax.servlet.http.HttpServletResponse response,
java.lang.String releaseMode)
Release the specified application module instance. |
void |
releaseAppModuleInstance(ApplicationModule appModule,
ApplicationPool pool,
javax.servlet.jsp.PageContext pageContext,
java.lang.String releaseMode)
Release the specified application module instance. |
void |
releaseAppModuleInstance(java.lang.String poolName,
javax.servlet.http.HttpSession session,
javax.servlet.http.HttpServletResponse response,
java.lang.String releaseMode)
Release the application module instance that was generated by the specified pool from the BC4J session context. |
static void |
returnAppModuleInstance(java.lang.String appName,
ApplicationModule appModule)
Deprecated. As of BC4J 3.2, replaced by releaseAppModuleInstance(String, HttpSession, HttpServletResponse, String) |
protected void |
writeSessionId(javax.servlet.http.HttpServletResponse response,
java.lang.String applicationName,
java.lang.String sessionId)
Write the session id to the HttpServletResponse. |
Methods inherited from class oracle.jdeveloper.html.WebBeanImpl |
generateScriptSrc,
getCookie,
getOut,
getRenderingContext,
getRequest,
getRequestVariable,
getUniqueName,
initBeanForJS,
initialize,
initialize,
initialize,
internalInitialize,
render,
render,
setRequestVariable |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String RESERVED
public static final java.lang.String STATEFUL
public static final java.lang.String STATELESS
Constructor Detail |
public JSPApplicationRegistry()
Method Detail |
public static JSPApplicationRegistry getInstance()
public static java.util.Hashtable getAppSettings(java.lang.String appName)
public static void returnAppModuleInstance(java.lang.String appName, ApplicationModule appModule)
releaseAppModuleInstance(String, HttpSession, HttpServletResponse, String)
public void releaseAppModuleInstance(ApplicationModule appModule, ApplicationPool pool, javax.servlet.http.HttpSession session, javax.servlet.http.HttpServletResponse response, java.lang.String releaseMode)
The specified release mode will determine how the application module is returned to the pool. The following release modes are currently supported:
RESERVED: Do not allow the application module instance to be shared with other client requests. The reserved lock will be released when the application module is checked in by a latter request in the application life cycle or when the http session times out.
STATEFUL: Only available if a HttpServletResponse has been specified. The implementation will check the application module instance into the pool in a stateful manner which will allow the pool to maintain the application module state between session requests. This may involve passivating the session's application module state so that the application may be reused by other session requests. Using this option will cause a servlet cookie to be generated and written to the HttpServletResponse.
STATELESS: Check the application module instance into the pool without retaining application module state.
ApplicationPool
public void releaseAppModuleInstance(ApplicationModule appModule, ApplicationPool pool, javax.servlet.jsp.PageContext pageContext, java.lang.String releaseMode)
The specified release mode will determine how the application module is returned to the pool. The following release modes are currently supported:
RESERVED: Do not allow the application module instance to be shared with other client requests. The reserved lock will be released when the application module is checked in by a latter request in the application life cycle or when the http session times out.
STATEFUL: Only available if a HttpServletResponse has been specified. The implementation will check the application module instance into the pool in a stateful manner which will allow the pool to maintain the application module state between session requests. This may involve passivating the session's application module state so that the application may be reused by other session requests. Using this option will cause a servlet cookie to be generated and written to the HttpServletResponse.
STATELESS: Check the application module instance into the pool without retaining application module state.
ApplicationPool
public void releaseAppModuleInstance(java.lang.String poolName, javax.servlet.http.HttpSession session, javax.servlet.http.HttpServletResponse response, java.lang.String releaseMode)
public ApplicationModule getAppModuleInstance(java.lang.String appName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpSession session)
The implementation will attempt to locate an application module in the session context before asking the application pool for an application module.
If an application module is not found in the session or page contexts
the implementation will check the http request for a session cookie id.
If a session cookie id exists the implementation will invoke,
getInstanceWithSessionId
,
in order to return an application module with the same state as the
application module that had been checked in by the session.
If a session cookie id does not exist the implementation will invoke,
checkout
in order
to return a fresh application module (no existing state) to the invokee.
The returned application module is always checked out of the specified application pool.
DataWebBeanImpl.internalInitialize()
public ApplicationModule getAppModuleInstance(java.lang.String appName, javax.servlet.jsp.PageContext pageContext)
The implementation will attempt to locate an application module in the page and session contexts before asking the application pool for an application module.
If an application module is not found in the session or page contexts
the implementation will check the http request for a session cookie id.
If a session cookie id exists the implementation will invoke,
getInstanceWithSessionId
,
in order to return an application module with the same state as the
application module that had been checked in by the session.
If a session cookie id does not exist the implementation will invoke,
checkout
in order
to return a fresh application module (no existing state) to the invokee.
The returned application module is always checked out of the specified application pool.
oracle.jbo.html.jsp.datatags.ApplicationModuleTag#doEndTag
public ApplicationModule getAppModuleFromContexts(java.lang.String appName, javax.servlet.http.HttpSession session, javax.servlet.jsp.PageContext pageContext)
If the page context is not null then first check the page context for a Bc4jPageContext container. If one is found then check for the specified application module instance. Otherwise check if the specified application module instance has been placed in the session context.
appModuleName
- the name of the appModule instance that should be
retrievedsession
- the HttpSession context that should be checked for the
named application module instancepageContext
- if a JSP client the name of the pageContext that
should be checked for the named application module instance. Null
otherwise.public static ApplicationModule getApplication(java.lang.String appName) throws java.lang.Exception
getAppModuleInstance(String, HttpServletRequest, HttpSession)
releaseAppModuleInstance(String, HttpSession, HttpServletResponse, String)
method
to return the Application Module back to the pool.public static void registerApplicationFromPropertyFile(javax.servlet.http.HttpSession session, java.lang.String sPropFileName)
public static void registerApplicationFromPropertyFile(java.lang.String sPropFileName)
public java.lang.String getReleaseMode(java.lang.String appName)
protected java.lang.String readSessionId(javax.servlet.http.HttpServletRequest request, java.lang.String applicationName)
applicationName
- the name of the application that has session stateprotected void writeSessionId(javax.servlet.http.HttpServletResponse response, java.lang.String applicationName, java.lang.String sessionId)
applicationName
- the name of the application that has session statepublic static oracle.jbo.http.HttpContainer getHttpContainer(javax.servlet.http.HttpSession session)
|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |