Oracle ADF Model and Business Components API Reference 10.1.2 B14022-02


oracle.jbo.html.jsp
Class JSPApplicationRegistry

java.lang.Object
  extended byoracle.jdeveloper.html.WebBeanImpl
      extended byoracle.jbo.html.jsp.JSPApplicationRegistry

All Implemented Interfaces:
WebBean

public class JSPApplicationRegistry
extends WebBeanImpl

This class provides the main interface for DataWebBeans to use the Application Module Pool. View implementation of JSPApplicationRegistry

Version:
PUBLIC

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, bUsedInTag, out, page, request, response, session

Fields inherited from interface oracle.jdeveloper.html.WebBean
contentFrameName, defaultCaboBase, defaultCaboImageBase, defaultImageBase, defaultJSPBase, defaultNLSFormat, JS_LIBRARIES, JS_NAMEID, JSButtonConstructorLib, JSCalendarConstructorLib, JSContainerConstructorLib, JSDataConstructLib, JSModalPageConstructorLib, JSTableConstructLib, JSToolbarConstructorLib, JSTreeConstructLib, JSUtilitiesLib

Constructor Summary
JSPApplicationRegistry()
Constructor, this should not be called directly

Method Summary
ApplicationModule getAppModuleFromContexts(java.lang.String applicationId, javax.servlet.http.HttpSession session, javax.servlet.jsp.PageContext pageContext)
Deprecated. application developers should use the following sample to acquire an ApplicationModule instead of getAppModuleFromContexts (assumes that the ApplicationModule instance was acquired with a SessionCookie, see getAppModuleInstance for more information):

HttpContainer container = HttpContainer.getInstanceFromSession(session); SessionCookie cookie = container.getSessionCookies(applicationId); ApplicationModule am = cookie.useApplicationModule();

where the applicationId is the id that was used when the SessionCookie was created (see getAppModuleInstance).

ApplicationModule getAppModuleFromSession(java.lang.String applicationId, javax.servlet.http.HttpSession session)
Deprecated. application developers should use the following sample to acquire an ApplicationModule instead of getAppModuleFromContexts (assumes that the ApplicationModule instance was acquired with a SessionCookie, see getAppModuleInstance for more information):

HttpContainer container = HttpContainer.getInstanceFromSession(session); SessionCookie cookie = container.getSessionCookies(applicationId); ApplicationModule am = cookie.useApplicationModule();

where the applicationId is the id that was used when the SessionCookie was created (see getAppModuleInstance).

ApplicationModule getAppModuleFromSession(java.lang.String applicationId, java.lang.String poolName, javax.servlet.http.HttpSession session)
Deprecated. application developers should use the following sample to acquire an ApplicationModule instead of getAppModuleFromContexts (assumes that the ApplicationModule instance was acquired with a SessionCookie, see getAppModuleInstance for more information):

HttpContainer container = HttpContainer.getInstanceFromSession(session); SessionCookie cookie = container.getSessionCookies(applicationId); ApplicationModule am = cookie.useApplicationModule();

where the applicationId is the id that was used when the SessionCookie was created (see getAppModuleInstance).

ApplicationModule getAppModuleInstance(java.lang.String applicationId, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpSession session)
Deprecated. application developers should use the following sample to acquire an ApplicationModule instead of getAppModuleInstance:

// Load the pool creation properties with the name of our custom // application pool class. Properties cookieProps = new Properties(); cookieProps.put(HttpSessionCookieFactory.HTTP_SERVLET_REQUEST, request); // Find a session cookie in the HttpSession for the specified // application id. If one does not exist this method will create one. SessionCookie cookie = HttpContainer.findSessionCookie( session , applicationId , configName // poolName , configPackage , configName , null // pool properties , cookieProps); ApplicationModule appModule = cookie.useApplicationModule();

where configPackage is the fully qualified package name of the ApplicationModule.

For more information please see the pooling sample at "$JDEV_HOME/BC4J/samples/Pooling".

ApplicationModule getAppModuleInstance(java.lang.String applicationId, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpSession session)
Deprecated. application developers should use the following sample to acquire an ApplicationModule instead of getAppModuleInstance:

// Load the pool creation properties with the name of our custom // application pool class. Properties cookieProps = new Properties(); cookieProps.put(HttpSessionCookieFactory.HTTP_SERVLET_REQUEST, request); // Find a session cookie in the HttpSession for the specified // application id. If one does not exist this method will create one. SessionCookie cookie = HttpContainer.findSessionCookie( session , applicationId , configName // poolName , configPackage , configName , null // pool properties , cookieProps); ApplicationModule appModule = cookie.useApplicationModule();

where configPackage is the fully qualified package name of the ApplicationModule.

For more information please see the pooling sample at "$JDEV_HOME/BC4J/samples/Pooling".

ApplicationModule getAppModuleInstance(java.lang.String applicationId, javax.servlet.jsp.PageContext pageContext)
Deprecated. application developers should use the following sample to acquire an ApplicationModule instead of getAppModuleInstance:

// Load the pool creation properties with the name of our custom // application pool class. Properties cookieProps = new Properties(); cookieProps.put(HttpSessionCookieFactory.HTTP_SERVLET_REQUEST, request); // Find a session cookie in the HttpSession for the specified // application id. If one does not exist this method will create one. SessionCookie cookie = HttpContainer.findSessionCookie( session , applicationId , configName // poolName , configPackage , configName , null // pool properties , cookieProps); ApplicationModule appModule = cookie.useApplicationModule();

where configPackage is the fully qualified package name of the ApplicationModule.

For more information please see the pooling sample at "$JDEV_HOME/BC4J/samples/Pooling".

ApplicationModule getAppModuleInstance(java.lang.String applicationId, java.lang.String poolName, javax.servlet.jsp.PageContext pageContext)
Deprecated. application developers should use the following sample to acquire an ApplicationModule instead of getAppModuleInstance:

// Load the pool creation properties with the name of our custom // application pool class. Properties cookieProps = new Properties(); cookieProps.put(HttpSessionCookieFactory.HTTP_SERVLET_REQUEST, request); // Find a session cookie in the HttpSession for the specified // application id. If one does not exist this method will create one. SessionCookie cookie = HttpContainer.findSessionCookie( session , applicationId , configName // poolName , configPackage , configName , null // pool properties , cookieProps); ApplicationModule appModule = cookie.useApplicationModule();

where configPackage is the fully qualified package name of the ApplicationModule.

For more information please see the pooling sample at "$JDEV_HOME/BC4J/samples/Pooling".

static java.util.Hashtable getAppSettings(java.lang.String poolName)
Returns the user data associated with the named pool.
static HttpContainer getHttpContainer(javax.servlet.http.HttpSession session)
Deprecated. use HttpContainer.getInstanceFromSession(session) instead
static JSPApplicationRegistry getInstance()
Returns the singleton instance of the registry class.
java.lang.String getReleaseMode(java.lang.String applicationId)
Helper method to obtain the specified application's release mode.
protected java.lang.String readSessionId(javax.servlet.http.HttpServletRequest request, java.lang.String applicationId)
Deprecated. the sessionId is now managed by the SessionCookie. Application developers wishing to override sessionId generation should create a custom SessionCookieFactory.

Application developers wishing to override how snapshot id(s) are stored and/or loaded should override:

{@link oracle.jbo.http.HttpSessionCookieImpl#writeValue(Object sink) {@link oracle.jbo.http.HttpSessionCookieImpl#readValue(Object source)

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)
Deprecated. application developers should use the following sample to release an ApplicationModule instead of releaseAppModuleInstance (assumes that the ApplicationModule instance was acquired with a SessionCookie, see getAppModuleInstance for more information):

HttpContainer container = HttpContainer.getInstanceFromSession(session); SessionCookie cookie = container.getSessionCookies(applicationId); // only release the ApplicationModule if it was reserved if (cookie != null && cookie.isApplicationModuleReserved()) { if (<Reserved release mode>) { cookie.releaseApplicationModule( SessionCookie.UNSHARED , SessionCookie.STATE_UNMANAGED); } else if (<Stateful release mode>) { cookie.releaseApplicationModule( SessionCookie.SHARED , SessionCookie.STATE_MANAGED); } else if (<Stateless release mode>) { cookie.releaseApplicationModule( SessionCookie.SHARED , SessionCookie.STATE_UNMANAGED); } }

void releaseAppModuleInstance(ApplicationModule appModule, ApplicationPool pool, javax.servlet.jsp.PageContext pageContext, java.lang.String releaseMode)
Deprecated. application developers should use the following sample to release an ApplicationModule instead of releaseAppModuleInstance (assumes that the ApplicationModule instance was acquired with a SessionCookie, see getAppModuleInstance for more information):

HttpContainer container = HttpContainer.getInstanceFromSession(session); SessionCookie cookie = container.getSessionCookies(applicationId); // only release the ApplicationModule if it was reserved if (cookie != null && cookie.isApplicationModuleReserved()) { if (<Reserved release mode>) { cookie.releaseApplicationModule( SessionCookie.UNSHARED , SessionCookie.STATE_UNMANAGED); } else if (<Stateful release mode>) { cookie.releaseApplicationModule( SessionCookie.SHARED , SessionCookie.STATE_MANAGED); } else if (<Stateless release mode>) { cookie.releaseApplicationModule( SessionCookie.SHARED , SessionCookie.STATE_UNMANAGED); } }

void releaseAppModuleInstance(java.lang.String applicationId, ApplicationModule appModule, ApplicationPool pool, javax.servlet.http.HttpSession session, javax.servlet.http.HttpServletResponse response, java.lang.String releaseMode)
Deprecated. application developers should use the following sample to release an ApplicationModule instead of releaseAppModuleInstance (assumes that the ApplicationModule instance was acquired with a SessionCookie, see getAppModuleInstance for more information):

HttpContainer container = HttpContainer.getInstanceFromSession(session); SessionCookie cookie = container.getSessionCookies(applicationId); // only release the ApplicationModule if it was reserved if (cookie != null && cookie.isApplicationModuleReserved()) { if (<Reserved release mode>) { cookie.releaseApplicationModule( SessionCookie.UNSHARED , SessionCookie.STATE_UNMANAGED); } else if (<Stateful release mode>) { cookie.releaseApplicationModule( SessionCookie.SHARED , SessionCookie.STATE_MANAGED); } else if (<Stateless release mode>) { cookie.releaseApplicationModule( SessionCookie.SHARED , SessionCookie.STATE_UNMANAGED); } }

void releaseAppModuleInstance(java.lang.String applicationId, javax.servlet.http.HttpSession session, javax.servlet.http.HttpServletResponse response, java.lang.String releaseMode)
Deprecated. application developers should use the following sample to release an ApplicationModule instead of releaseAppModuleInstance (assumes that the ApplicationModule instance was acquired with a SessionCookie, see getAppModuleInstance for more information):

HttpContainer container = HttpContainer.getInstanceFromSession(session); SessionCookie cookie = container.getSessionCookies(applicationId); // only release the ApplicationModule if it was reserved if (cookie != null && cookie.isApplicationModuleReserved()) { if (<Reserved release mode>) { cookie.releaseApplicationModule( SessionCookie.UNSHARED , SessionCookie.STATE_UNMANAGED); } else if (<Stateful release mode>) { cookie.releaseApplicationModule( SessionCookie.SHARED , SessionCookie.STATE_MANAGED); } else if (<Stateless release mode>) { cookie.releaseApplicationModule( SessionCookie.SHARED , SessionCookie.STATE_UNMANAGED); } }

protected void writeSessionId(javax.servlet.http.HttpServletResponse response, java.lang.String applicationId, java.lang.String sessionId)
Deprecated. the sessionId is now managed by the SessionCookie. Application developers wishing to override sessionId generation should create a custom SessionCookieFactory.

Application developers wishing to override how snapshot id(s) are stored and/or loaded should override:

{@link oracle.jbo.http.HttpSessionCookieImpl#writeValue(Object sink) {@link oracle.jbo.http.HttpSessionCookieImpl#readValue(Object source)

Methods inherited from class oracle.jdeveloper.html.WebBeanImpl
generateScriptSrc, getCookie, getOut, getRequest, getRequestVariable, getRequestVariable, getUniqueName, initBeanForJS, initBeanForJS, initBeanForJS, initialize, initialize, initialize, internalInitialize, render, render, setRequestVariable, setRequestVariable

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

RESERVED

public static final java.lang.String RESERVED
See Also:
Constant Field Values

STATEFUL

public static final java.lang.String STATEFUL
See Also:
Constant Field Values

STATELESS

public static final java.lang.String STATELESS
See Also:
Constant Field Values

Constructor Detail

JSPApplicationRegistry

public JSPApplicationRegistry()
Constructor, this should not be called directly

Method Detail

getInstance

public static JSPApplicationRegistry getInstance()
Returns the singleton instance of the registry class.

getAppSettings

public static java.util.Hashtable getAppSettings(java.lang.String poolName)
Returns the user data associated with the named pool. The user data is a convenient palce for storing and retrieving application-specific information shared by all application instances that are part of the named pool.

releaseAppModuleInstance

public void releaseAppModuleInstance(java.lang.String applicationId,
                                     ApplicationModule appModule,
                                     ApplicationPool pool,
                                     javax.servlet.http.HttpSession session,
                                     javax.servlet.http.HttpServletResponse response,
                                     java.lang.String releaseMode)
Deprecated. application developers should use the following sample to release an ApplicationModule instead of releaseAppModuleInstance (assumes that the ApplicationModule instance was acquired with a SessionCookie, see getAppModuleInstance for more information):

HttpContainer container = HttpContainer.getInstanceFromSession(session); SessionCookie cookie = container.getSessionCookies(applicationId); // only release the ApplicationModule if it was reserved if (cookie != null && cookie.isApplicationModuleReserved()) { if (<Reserved release mode>) { cookie.releaseApplicationModule( SessionCookie.UNSHARED , SessionCookie.STATE_UNMANAGED); } else if (<Stateful release mode>) { cookie.releaseApplicationModule( SessionCookie.SHARED , SessionCookie.STATE_MANAGED); } else if (<Stateless release mode>) { cookie.releaseApplicationModule( SessionCookie.SHARED , SessionCookie.STATE_UNMANAGED); } }

Release the specified application module instance. This method is intended for use by servlet clients in order to release an application module resource to the application module pool.

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.

Since:
5.0
See Also:
ApplicationPool, HttpContainer, HttpSessionCookie

releaseAppModuleInstance

public void releaseAppModuleInstance(java.lang.String applicationId,
                                     javax.servlet.http.HttpSession session,
                                     javax.servlet.http.HttpServletResponse response,
                                     java.lang.String releaseMode)
Deprecated. application developers should use the following sample to release an ApplicationModule instead of releaseAppModuleInstance (assumes that the ApplicationModule instance was acquired with a SessionCookie, see getAppModuleInstance for more information):

HttpContainer container = HttpContainer.getInstanceFromSession(session); SessionCookie cookie = container.getSessionCookies(applicationId); // only release the ApplicationModule if it was reserved if (cookie != null && cookie.isApplicationModuleReserved()) { if (<Reserved release mode>) { cookie.releaseApplicationModule( SessionCookie.UNSHARED , SessionCookie.STATE_UNMANAGED); } else if (<Stateful release mode>) { cookie.releaseApplicationModule( SessionCookie.SHARED , SessionCookie.STATE_MANAGED); } else if (<Stateless release mode>) { cookie.releaseApplicationModule( SessionCookie.SHARED , SessionCookie.STATE_UNMANAGED); } }

Since:
5.0
See Also:
HttpContainer, HttpSessionCookie

releaseAppModuleInstance

public void releaseAppModuleInstance(ApplicationModule appModule,
                                     ApplicationPool pool,
                                     javax.servlet.http.HttpSession session,
                                     javax.servlet.http.HttpServletResponse response,
                                     java.lang.String releaseMode)
Deprecated. application developers should use the following sample to release an ApplicationModule instead of releaseAppModuleInstance (assumes that the ApplicationModule instance was acquired with a SessionCookie, see getAppModuleInstance for more information):

HttpContainer container = HttpContainer.getInstanceFromSession(session); SessionCookie cookie = container.getSessionCookies(applicationId); // only release the ApplicationModule if it was reserved if (cookie != null && cookie.isApplicationModuleReserved()) { if (<Reserved release mode>) { cookie.releaseApplicationModule( SessionCookie.UNSHARED , SessionCookie.STATE_UNMANAGED); } else if (<Stateful release mode>) { cookie.releaseApplicationModule( SessionCookie.SHARED , SessionCookie.STATE_MANAGED); } else if (<Stateless release mode>) { cookie.releaseApplicationModule( SessionCookie.SHARED , SessionCookie.STATE_UNMANAGED); } }

Since:
5.0
See Also:
void releaseAppModuleInstance(String, ApplicationModule, ApplicationPool, HttpSession, HttpServletResponse, String releaseMode), HttpContainer, HttpSessionCookie

releaseAppModuleInstance

public void releaseAppModuleInstance(ApplicationModule appModule,
                                     ApplicationPool pool,
                                     javax.servlet.jsp.PageContext pageContext,
                                     java.lang.String releaseMode)
Deprecated. application developers should use the following sample to release an ApplicationModule instead of releaseAppModuleInstance (assumes that the ApplicationModule instance was acquired with a SessionCookie, see getAppModuleInstance for more information):

HttpContainer container = HttpContainer.getInstanceFromSession(session); SessionCookie cookie = container.getSessionCookies(applicationId); // only release the ApplicationModule if it was reserved if (cookie != null && cookie.isApplicationModuleReserved()) { if (<Reserved release mode>) { cookie.releaseApplicationModule( SessionCookie.UNSHARED , SessionCookie.STATE_UNMANAGED); } else if (<Stateful release mode>) { cookie.releaseApplicationModule( SessionCookie.SHARED , SessionCookie.STATE_MANAGED); } else if (<Stateless release mode>) { cookie.releaseApplicationModule( SessionCookie.SHARED , SessionCookie.STATE_UNMANAGED); } }

Since:
5.0
See Also:
void releaseAppModuleInstance(String, ApplicationModule, ApplicationPool, HttpSession, HttpServletResponse, String releaseMode), HttpContainer, HttpSessionCookie

getAppModuleInstance

public ApplicationModule getAppModuleInstance(java.lang.String applicationId,
                                              javax.servlet.http.HttpServletRequest request,
                                              javax.servlet.http.HttpSession session)
Deprecated. application developers should use the following sample to acquire an ApplicationModule instead of getAppModuleInstance:

// Load the pool creation properties with the name of our custom // application pool class. Properties cookieProps = new Properties(); cookieProps.put(HttpSessionCookieFactory.HTTP_SERVLET_REQUEST, request); // Find a session cookie in the HttpSession for the specified // application id. If one does not exist this method will create one. SessionCookie cookie = HttpContainer.findSessionCookie( session , applicationId , configName // poolName , configPackage , configName , null // pool properties , cookieProps); ApplicationModule appModule = cookie.useApplicationModule();

where configPackage is the fully qualified package name of the ApplicationModule.

For more information please see the pooling sample at "$JDEV_HOME/BC4J/samples/Pooling".

Get an application module instance for the specified application pool. This method is intended for servlet clients that require an application module.

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 value. If a session cookie value exists the method will instantiate a new (@link oracle.jbo.common.ampool.SessionCookie SessionCookie} instance using that cookie value. If a session cookie value is not found in the request then the method will invoke (@link #getSessionId getSessionId}. to obtain a unique session identifier. The returned session id will be used to instantiate a new (@link oracle.jbo.common.ampool.SessionCookie SessionCookie} instance.

The SessionCookie instance generated above is passed to the application pool during checkout. The application pool will use the session cookie to identify the client session and to activate any application state which may have been passivated at the end of a previous request from this session.

Parameters:
applicationId - the id of the requesting session application The applicationId should match the name of the pool that was used to generate the requested instance
Since:
5.0
See Also:
DataWebBeanImpl.internalInitialize(), HttpContainer, HttpSessionCookie

getAppModuleInstance

public ApplicationModule getAppModuleInstance(java.lang.String applicationId,
                                              javax.servlet.http.HttpServletRequest request,
                                              javax.servlet.http.HttpServletResponse response,
                                              javax.servlet.http.HttpSession session)
Deprecated. application developers should use the following sample to acquire an ApplicationModule instead of getAppModuleInstance:

// Load the pool creation properties with the name of our custom // application pool class. Properties cookieProps = new Properties(); cookieProps.put(HttpSessionCookieFactory.HTTP_SERVLET_REQUEST, request); // Find a session cookie in the HttpSession for the specified // application id. If one does not exist this method will create one. SessionCookie cookie = HttpContainer.findSessionCookie( session , applicationId , configName // poolName , configPackage , configName , null // pool properties , cookieProps); ApplicationModule appModule = cookie.useApplicationModule();

where configPackage is the fully qualified package name of the ApplicationModule.

For more information please see the pooling sample at "$JDEV_HOME/BC4J/samples/Pooling".

Since:
5.0
See Also:
HttpContainer, HttpSessionCookie

getAppModuleInstance

public ApplicationModule getAppModuleInstance(java.lang.String applicationId,
                                              javax.servlet.jsp.PageContext pageContext)
Deprecated. application developers should use the following sample to acquire an ApplicationModule instead of getAppModuleInstance:

// Load the pool creation properties with the name of our custom // application pool class. Properties cookieProps = new Properties(); cookieProps.put(HttpSessionCookieFactory.HTTP_SERVLET_REQUEST, request); // Find a session cookie in the HttpSession for the specified // application id. If one does not exist this method will create one. SessionCookie cookie = HttpContainer.findSessionCookie( session , applicationId , configName // poolName , configPackage , configName , null // pool properties , cookieProps); ApplicationModule appModule = cookie.useApplicationModule();

where configPackage is the fully qualified package name of the ApplicationModule.

For more information please see the pooling sample at "$JDEV_HOME/BC4J/samples/Pooling".

Since:
5.0
See Also:
getAppModuleInstance(String, HttpServletRequest, HttpSession), HttpContainer, HttpSessionCookie

getAppModuleInstance

public ApplicationModule getAppModuleInstance(java.lang.String applicationId,
                                              java.lang.String poolName,
                                              javax.servlet.jsp.PageContext pageContext)
Deprecated. application developers should use the following sample to acquire an ApplicationModule instead of getAppModuleInstance:

// Load the pool creation properties with the name of our custom // application pool class. Properties cookieProps = new Properties(); cookieProps.put(HttpSessionCookieFactory.HTTP_SERVLET_REQUEST, request); // Find a session cookie in the HttpSession for the specified // application id. If one does not exist this method will create one. SessionCookie cookie = HttpContainer.findSessionCookie( session , applicationId , configName // poolName , configPackage , configName , null // pool properties , cookieProps); ApplicationModule appModule = cookie.useApplicationModule();

where configPackage is the fully qualified package name of the ApplicationModule.

For more information please see the pooling sample at "$JDEV_HOME/BC4J/samples/Pooling".

Since:
5.0
See Also:
getAppModuleInstance(String, HttpServletRequest, HttpSession), HttpContainer, HttpSessionCookie

getAppModuleFromContexts

public ApplicationModule getAppModuleFromContexts(java.lang.String applicationId,
                                                  javax.servlet.http.HttpSession session,
                                                  javax.servlet.jsp.PageContext pageContext)
Deprecated. application developers should use the following sample to acquire an ApplicationModule instead of getAppModuleFromContexts (assumes that the ApplicationModule instance was acquired with a SessionCookie, see getAppModuleInstance for more information):

HttpContainer container = HttpContainer.getInstanceFromSession(session); SessionCookie cookie = container.getSessionCookies(applicationId); ApplicationModule am = cookie.useApplicationModule();

where the applicationId is the id that was used when the SessionCookie was created (see getAppModuleInstance).

Check the relevant http contexts for the named application module instance.

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.

Parameters:
applicationId - the application module id of the requested application module The applicationId should match the name of the pool that was used to generate the requested instance
session - the HttpSession context that should be checked for the named application module instance
pageContext - if a JSP client the name of the pageContext that should be checked for the named application module instance. Null otherwise.
Since:
5.0
See Also:
HttpContainer, HttpSessionCookie

getAppModuleFromSession

public ApplicationModule getAppModuleFromSession(java.lang.String applicationId,
                                                 javax.servlet.http.HttpSession session)
Deprecated. application developers should use the following sample to acquire an ApplicationModule instead of getAppModuleFromContexts (assumes that the ApplicationModule instance was acquired with a SessionCookie, see getAppModuleInstance for more information):

HttpContainer container = HttpContainer.getInstanceFromSession(session); SessionCookie cookie = container.getSessionCookies(applicationId); ApplicationModule am = cookie.useApplicationModule();

where the applicationId is the id that was used when the SessionCookie was created (see getAppModuleInstance).

Check the http session for the named application module instance.
Parameters:
applicationId - the id of the requested application module instance The applicationId should match the name of the pool that was used to generate the requested instance
session - the HttpSession context that should be checked for the named application module instance
Since:
5.0
See Also:
HttpContainer, HttpSessionCookie

getAppModuleFromSession

public ApplicationModule getAppModuleFromSession(java.lang.String applicationId,
                                                 java.lang.String poolName,
                                                 javax.servlet.http.HttpSession session)
Deprecated. application developers should use the following sample to acquire an ApplicationModule instead of getAppModuleFromContexts (assumes that the ApplicationModule instance was acquired with a SessionCookie, see getAppModuleInstance for more information):

HttpContainer container = HttpContainer.getInstanceFromSession(session); SessionCookie cookie = container.getSessionCookies(applicationId); ApplicationModule am = cookie.useApplicationModule();

where the applicationId is the id that was used when the SessionCookie was created (see getAppModuleInstance).

Check the http session for the named application module instance.
Parameters:
applicationId - the id of the requested application module instance
poolName - the application name of the requesting thread
session - the HttpSession context that should be checked for the named application module instance
Since:
5.0
See Also:
HttpContainer, HttpSessionCookie

registerApplicationFromPropertyFile

public static void registerApplicationFromPropertyFile(javax.servlet.http.HttpSession session,
                                                       java.lang.String sPropFileName)
Convenience method for defining a new application pool from a property file. This also transfers some system specific variables to the JSP Session object.

registerApplicationFromPropertyFile

public static void registerApplicationFromPropertyFile(java.lang.String sPropFileName)
Creates a new application pool from the contents of a property file. Please look at the ConnectionInfo class for documentation of what should be contained in the property file.

getReleaseMode

public java.lang.String getReleaseMode(java.lang.String applicationId)
Helper method to obtain the specified application's release mode.

readSessionId

protected java.lang.String readSessionId(javax.servlet.http.HttpServletRequest request,
                                         java.lang.String applicationId)
Deprecated. the sessionId is now managed by the SessionCookie. Application developers wishing to override sessionId generation should create a custom SessionCookieFactory.

Application developers wishing to override how snapshot id(s) are stored and/or loaded should override:

{@link oracle.jbo.http.HttpSessionCookieImpl#writeValue(Object sink) {@link oracle.jbo.http.HttpSessionCookieImpl#readValue(Object source)

Since:
5.0
See Also:
HttpSessionCookieHelper.readCookieValue(HttpServletRequest, String)

writeSessionId

protected void writeSessionId(javax.servlet.http.HttpServletResponse response,
                              java.lang.String applicationId,
                              java.lang.String sessionId)
Deprecated. the sessionId is now managed by the SessionCookie. Application developers wishing to override sessionId generation should create a custom SessionCookieFactory.

Application developers wishing to override how snapshot id(s) are stored and/or loaded should override:

{@link oracle.jbo.http.HttpSessionCookieImpl#writeValue(Object sink) {@link oracle.jbo.http.HttpSessionCookieImpl#readValue(Object source)

Since:
5.0
See Also:
HttpSessionCookieHelper.writeCookieValue(HttpServletResponse, String, String)

getHttpContainer

public static HttpContainer getHttpContainer(javax.servlet.http.HttpSession session)
Deprecated. use HttpContainer.getInstanceFromSession(session) instead
Since:
5.0
See Also:
HttpContainer, HttpSessionCookie

Oracle ADF Model and Business Components API Reference 10.1.2 B14022-02


Copyright © 1997, 2005, Oracle. All rights reserved.