Business Components

oracle.jbo.html.jsp
Class JSPApplicationRegistry

java.lang.Object
  |
  +--oracle.jdeveloper.html.WebBeanImpl
        |
        +--oracle.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
TypeField
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
TypeMethod
 ApplicationModule getAppModuleFromContexts(java.lang.String applicationId, javax.servlet.http.HttpSession session, javax.servlet.jsp.PageContext pageContext)
          Deprecated.  
 ApplicationModule getAppModuleFromSession(java.lang.String applicationId, javax.servlet.http.HttpSession session)
          Deprecated.  
 ApplicationModule getAppModuleFromSession(java.lang.String applicationId, java.lang.String poolName, javax.servlet.http.HttpSession session)
          Deprecated.  
 ApplicationModule getAppModuleInstance(java.lang.String applicationId, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpSession session)
          Deprecated.  
 ApplicationModule getAppModuleInstance(java.lang.String applicationId, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpSession session)
          Deprecated.  
 ApplicationModule getAppModuleInstance(java.lang.String applicationId, javax.servlet.jsp.PageContext pageContext)
          Deprecated.  
 ApplicationModule getAppModuleInstance(java.lang.String applicationId, java.lang.String poolName, javax.servlet.jsp.PageContext pageContext)
          Deprecated.  
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.  
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.  
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.  
 void releaseAppModuleInstance(ApplicationModule appModule, ApplicationPool pool, javax.servlet.jsp.PageContext pageContext, java.lang.String releaseMode)
          Deprecated.  
 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.  
 void releaseAppModuleInstance(java.lang.String applicationId, javax.servlet.http.HttpSession session, javax.servlet.http.HttpServletResponse response, java.lang.String releaseMode)
          Deprecated.  
protected  void writeSessionId(javax.servlet.http.HttpServletResponse response, java.lang.String applicationId, java.lang.String sessionId)
          Deprecated.  
 
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

STATEFUL

public static final java.lang.String STATEFUL

STATELESS

public static final java.lang.String STATELESS
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.  

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.  

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.  

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.  

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.  

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.  

Since:
5.0
See Also:
HttpContainer, HttpSessionCookie

getAppModuleInstance

public ApplicationModule getAppModuleInstance(java.lang.String applicationId,
                                              javax.servlet.jsp.PageContext pageContext)
Deprecated.  

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.  

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.  

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.  

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.  

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.  

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.  

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

getHttpContainer

public static HttpContainer getHttpContainer(javax.servlet.http.HttpSession session)
Deprecated.  

Since:
5.0
See Also:
HttpContainer, HttpSessionCookie

Business Components