com.plumtree.uiinfrastructure.application
Class AppWarmUp

java.lang.Object
  extended by com.plumtree.uiinfrastructure.application.AppWarmUp

public class AppWarmUp
extends java.lang.Object

This class provides the common jumpable initialization code for both the servlet and .aspx code to call. The initialization can be split into a core section, and a load section. The core method should be run only once, while the load methods can be called multiple times, to support extensible features.

Author:
John Osborne, Don Hayler, Ricky Wong, David Phipps

Field Summary
static java.lang.String APP_KEY_NUM_CUSTOM_VARPACKS
          This counter is used in the diagnostic page.
static java.lang.String FILE_ACTIVITY_SPACES_XML
           
static java.lang.String FILE_CUSTOM_ACTIVITY_SPACES_XML
           
static java.lang.String FILE_CUSTOM_VAR_PACKS_XML
           
static java.lang.String FILE_PORTAL_CONFIG_XML
           
static java.lang.String FILE_SERVER_CONFIG_XML
           
static java.lang.String FILE_VAR_PACKS_XML
           
static java.lang.String FOLDER_COMMON
           
static java.lang.String FOLDER_DYNAMIC_LOADS
           
static java.lang.String FOLDER_I18N
           
static java.lang.String FOLDER_PORTAL
           
static java.lang.String FOLDER_SETTINGS
           
static java.lang.String KEY_APP_WARMUP_HELPER
           
static java.lang.String KEY_BASE_CONFIG_VARPACK
           
static java.lang.String KEY_CACHEMAN_CLASS_TYPE_MANAGER
           
static java.lang.String KEY_CACHEMAN_IMAGE_SERVER_HELPER
           
static java.lang.String KEY_CACHEMAN_JS_REGISTRY
           
static java.lang.String KEY_CACHEMAN_RESOURCE_MANAGER
           
static java.lang.String KEY_CACHEMAN_SECURE_JS_REGISTRY
           
static java.lang.String KEY_FILE_ACTIVITY_SPACES
           
static java.lang.String KEY_FILE_CUSTOM_ACTIVITY_SPACES
           
static java.lang.String KEY_FILE_CUSTOM_VAR_PACKS
           
static java.lang.String KEY_FILE_VAR_PACKS
           
static java.lang.String KEY_PATH_LIB_HOME
           
static java.lang.String KEY_PATH_PORTAL_CONFIG
           
static java.lang.String KEY_PATH_PORTAL_DYNAMIC_LOADS
           
static java.lang.String KEY_PATH_PORTAL_HOME
           
static java.lang.String KEY_PATH_PORTAL_I18N
           
static java.lang.String KEY_PATH_PORTAL_SETTINGS
           
static java.lang.String KEY_PATH_WEB_HOME
           
static java.lang.String KEY_STR_APPLICATION_NAME
           
static java.lang.String KEY_STR_DEV_KIT_VERSION
           
static java.lang.String KEY_STR_IMAGESERVER_BASE_URL
           
static java.lang.String KEY_STR_IMAGESERVER_CONNECTION_URL
           
static java.lang.String KEY_STR_PLATFORM
           
static java.lang.String KEY_STR_SECURE_IMAGESERVER_BASE_URL
           
static IOKContext m_configContext
           
static IOKComponent m_portalComponent
           
static java.lang.String PARAM_APPWARMUPHELPER_LIBFILE
           
static java.lang.String PARAM_APPWARMUPHELPER_NAME
           
static java.lang.String PARAM_PTHOME_ENVVAR_NAME
           
static java.lang.String PARAM_PTHOME_PRODUCT_NAME
           
static java.lang.String PATH_SEPARATOR
           
static XPHashtable s_htInitSettings
          Hashtable that stores all of the settings gathered from initialization.
static java.lang.String STR_SUPPORTED_DOTNET_SDK
           
static java.lang.String STR_SUPPORTED_JAVA_JDK_1
           
static java.lang.String STR_SUPPORTED_JAVA_JDK_2
           
static java.lang.String STR_SUPPORTED_JAVA_JDK_3
           
static java.lang.String STR_SUPPORTED_JAVA_JDK_6
           
static java.lang.String SUFFIX_WAR_FILE
           
static java.lang.String SUFFIX_XML_FILE
           
 
Constructor Summary
AppWarmUp()
           
 
Method Summary
static void GenerateFailureErrorReport(java.lang.Throwable e)
          Handle exception in startup, and general failure messages.
static IOKContext GetOKConfigContext()
          Get the OpenConfig context for use by OpenKernel services.
static java.lang.Object GetSettingValue(java.lang.String strKey)
          Helper to return the setting value from the settings hashtable.
static java.lang.String GetSettingValueAsString(java.lang.String strKey)
          Helper to return the setting value from the settings hashtable.
static EventLog[] getStartupNotificationErrorLogs()
          Gets the error report from the startup noitication service, Identical to the information generated by the diagnostic tool.
static java.lang.String[] getStartupNotificationErrorReport()
          Gets the error report from the startup noitication service, Identical to the information generated by the diagnostic tool.
static ReturnValue HelperDeterminePaths()
          Helper that determines some of the more complex paths.
static ReturnValue HelperLoadVarPacks(java.lang.String strVarPackFile, java.lang.String strLibHomePath, java.lang.String strConfigPath, IApplication application, boolean bOverWrite)
          Helper that loads VarPacks from a config file.
static ReturnValue HelperTestLanguages(java.lang.String _strPortalResourceFolder)
          Helper that tests our language files.
static void Init(java.lang.String _strApplicationName)
          This is the main method used to initialize the Portal Application.
static ReturnValue LoopStartupTasks(java.lang.String _strApplicationName, boolean bPreflightForProgress)
          Actual executor for the startup tasks; handles the concept of "preflight", which the progress indicator uses to estimate the number of tasks and task-steps to run for an accurate representation of true progress.
static ReturnValue RunStartupTasks(java.lang.String _strApplicationName)
          Execute the startup tasks defined in PTStartupTasks.
static void setNotification(IStartupNotification notify)
          This is the first method any tool should call that wants to know if startup is successful.
static void setStartupNotificationErrorLogs(EventLog[] eventVector, XPArrayList reportLog)
          Gets the error report from the startup noitication service, Identical to the information generated by the diagnostic tool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s_htInitSettings

public static XPHashtable s_htInitSettings
Hashtable that stores all of the settings gathered from initialization. It is static because we need it to be updateable by all the static methods of this class. It was private to prevent tampering of the data, but is now public to allow unit testing.


SUFFIX_XML_FILE

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

SUFFIX_WAR_FILE

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

PATH_SEPARATOR

public static final java.lang.String PATH_SEPARATOR

m_configContext

public static IOKContext m_configContext

m_portalComponent

public static IOKComponent m_portalComponent

STR_SUPPORTED_DOTNET_SDK

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

STR_SUPPORTED_JAVA_JDK_1

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

STR_SUPPORTED_JAVA_JDK_2

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

STR_SUPPORTED_JAVA_JDK_3

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

STR_SUPPORTED_JAVA_JDK_6

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

FOLDER_I18N

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

FOLDER_PORTAL

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

FOLDER_SETTINGS

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

FOLDER_DYNAMIC_LOADS

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

FOLDER_COMMON

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

FILE_SERVER_CONFIG_XML

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

FILE_PORTAL_CONFIG_XML

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

FILE_VAR_PACKS_XML

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

FILE_ACTIVITY_SPACES_XML

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

FILE_CUSTOM_VAR_PACKS_XML

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

FILE_CUSTOM_ACTIVITY_SPACES_XML

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

PARAM_PTHOME_PRODUCT_NAME

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

PARAM_PTHOME_ENVVAR_NAME

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

PARAM_APPWARMUPHELPER_LIBFILE

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

PARAM_APPWARMUPHELPER_NAME

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

KEY_CACHEMAN_IMAGE_SERVER_HELPER

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

KEY_CACHEMAN_RESOURCE_MANAGER

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

KEY_CACHEMAN_JS_REGISTRY

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

KEY_CACHEMAN_SECURE_JS_REGISTRY

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

KEY_CACHEMAN_CLASS_TYPE_MANAGER

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

KEY_APP_WARMUP_HELPER

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

KEY_BASE_CONFIG_VARPACK

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

KEY_FILE_VAR_PACKS

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

KEY_FILE_ACTIVITY_SPACES

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

KEY_FILE_CUSTOM_VAR_PACKS

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

KEY_FILE_CUSTOM_ACTIVITY_SPACES

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

KEY_PATH_PORTAL_HOME

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

KEY_PATH_PORTAL_SETTINGS

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

KEY_PATH_PORTAL_CONFIG

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

KEY_PATH_PORTAL_I18N

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

KEY_PATH_PORTAL_DYNAMIC_LOADS

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

KEY_PATH_WEB_HOME

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

KEY_PATH_LIB_HOME

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

KEY_STR_APPLICATION_NAME

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

KEY_STR_DEV_KIT_VERSION

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

KEY_STR_PLATFORM

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

KEY_STR_IMAGESERVER_BASE_URL

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

KEY_STR_SECURE_IMAGESERVER_BASE_URL

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

KEY_STR_IMAGESERVER_CONNECTION_URL

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

APP_KEY_NUM_CUSTOM_VARPACKS

public static final java.lang.String APP_KEY_NUM_CUSTOM_VARPACKS
This counter is used in the diagnostic page.

See Also:
Constant Field Values
Constructor Detail

AppWarmUp

public AppWarmUp()
Method Detail

setNotification

public static final void setNotification(IStartupNotification notify)
This is the first method any tool should call that wants to know if startup is successful. It sets a callback class used by the startup for notification. Calling this is optional.


Init

public static final void Init(java.lang.String _strApplicationName)
This is the main method used to initialize the Portal Application. There are three steps to getting the Portal up and running. First, we perform any preinitialization checks. If the checks succeed, we initialize our Portal. When initialization is complete, we finally load any customized objects that we have. The difference between the initialization and loading steps is that the loading steps can be invoked again for reloading purposes. The initializations steps are not designed to be rerun.

Parameters:
_strApplicationName - Name to give to this Application.

GenerateFailureErrorReport

public static void GenerateFailureErrorReport(java.lang.Throwable e)
Handle exception in startup, and general failure messages. Also handles really intensely bad errors like path missing, jars missing, dlls missing and so forth. This is for XPExceptions and Throwables caught by the standard runner.

Parameters:
e -

GetOKConfigContext

public static IOKContext GetOKConfigContext()
Get the OpenConfig context for use by OpenKernel services.


getStartupNotificationErrorReport

public static java.lang.String[] getStartupNotificationErrorReport()
Gets the error report from the startup noitication service, Identical to the information generated by the diagnostic tool.

Returns:
String array with report

getStartupNotificationErrorLogs

public static EventLog[] getStartupNotificationErrorLogs()
Gets the error report from the startup noitication service, Identical to the information generated by the diagnostic tool.

Returns:
EventLog array with report

setStartupNotificationErrorLogs

public static void setStartupNotificationErrorLogs(EventLog[] eventVector,
                                                   XPArrayList reportLog)
Gets the error report from the startup noitication service, Identical to the information generated by the diagnostic tool.


HelperLoadVarPacks

public static final ReturnValue HelperLoadVarPacks(java.lang.String strVarPackFile,
                                                   java.lang.String strLibHomePath,
                                                   java.lang.String strConfigPath,
                                                   IApplication application,
                                                   boolean bOverWrite)
Helper that loads VarPacks from a config file.

Parameters:
strVarPackFile -
strLibHomePath -
strConfigPath -
application -
bOverWrite - true implies that the Custom Object Counter will be incremented for these classes.

HelperTestLanguages

public static final ReturnValue HelperTestLanguages(java.lang.String _strPortalResourceFolder)
Helper that tests our language files.

Parameters:
_strPortalResourceFolder -

HelperDeterminePaths

public static ReturnValue HelperDeterminePaths()
Helper that determines some of the more complex paths. The WebHome and LibHome paths are constructed here.


GetSettingValue

public static java.lang.Object GetSettingValue(java.lang.String strKey)
Helper to return the setting value from the settings hashtable.

Parameters:
strKey - Key for the setting value to retrieve.
Returns:
Value for the corresponding key.

GetSettingValueAsString

public static java.lang.String GetSettingValueAsString(java.lang.String strKey)
Helper to return the setting value from the settings hashtable.

Parameters:
strKey - Key for the setting value to retrieve.
Returns:
Value for the corresponding key.

RunStartupTasks

public static ReturnValue RunStartupTasks(java.lang.String _strApplicationName)
Execute the startup tasks defined in PTStartupTasks. Note that the handling of each return value is delegated to the notification factory. The default handling is to continue until a fatal error is encountered.


LoopStartupTasks

public static ReturnValue LoopStartupTasks(java.lang.String _strApplicationName,
                                           boolean bPreflightForProgress)
Actual executor for the startup tasks; handles the concept of "preflight", which the progress indicator uses to estimate the number of tasks and task-steps to run for an accurate representation of true progress. This *is* the new application warmup. Each warmup step is managed through this looping mechanism.

Parameters:
bPreflightForProgress -



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.