public abstract class ERXApplication extends ERXAjaxApplication implements ERXGracefulShutdown.GracefulApplication
| Properties | |
AppShouldExitOnOutOfMemoryError | AppShouldExitOnOutOfMemoryError |
ERApplicationName | ERApplicationName |
ERApplicationNameSuffix | ERApplicationNameSuffix |
ERTimeToDie | ERTimeToDie |
ERTimeToKill | ERTimeToKill |
ERTimeToLive | ERTimeToLive |
NSProjectBundleEnabled | NSProjectBundleEnabled |
WOIDE | WOIDE |
_DisableClasspathReorder | _DisableClasspathReorder |
er.extensions.ERXApplication.DefaultEncoding | er.extensions.ERXApplication.DefaultEncoding |
er.extensions.ERXApplication.DefaultMessageEncoding | er.extensions.ERXApplication.DefaultMessageEncoding |
er.extensions.ERXApplication.StatisticsBaseLogPath | er.extensions.ERXApplication.StatisticsBaseLogPath |
er.extensions.ERXApplication.StatisticsLogRotationFrequency | er.extensions.ERXApplication.StatisticsLogRotationFrequency |
er.extensions.ERXApplication.developmentMode | er.extensions.ERXApplication.developmentMode |
er.extensions.ERXApplication.developmentMode | er.extensions.ERXApplication.developmentMode |
er.extensions.ERXApplication.enableERXShutdownHook | er.extensions.ERXApplication.enableERXShutdownHook |
er.extensions.ERXApplication.fixCachingEnabled | er.extensions.ERXApplication.fixCachingEnabled |
er.extensions.ERXApplication.lowMemBufferSize | er.extensions.ERXApplication.lowMemBufferSize |
er.extensions.ERXApplication.memoryLowThreshold | er.extensions.ERXApplication.memoryLowThreshold |
er.extensions.ERXApplication.memoryStarvedThreshold | er.extensions.ERXApplication.memoryStarvedThreshold |
er.extensions.ERXApplication.memoryThreshold | er.extensions.ERXApplication.memoryThreshold |
er.extensions.ERXApplication.redirectOnMissingObjects | er.extensions.ERXApplication.redirectOnMissingObjects |
er.extensions.ERXApplication.replaceApplicationPath.pattern | er.extensions.ERXApplication.replaceApplicationPath.pattern |
er.extensions.ERXApplication.replaceApplicationPath.replace | er.extensions.ERXApplication.replaceApplicationPath.replace |
er.extensions.ERXApplication.responseCompressionEnabled | er.extensions.ERXApplication.responseCompressionEnabled |
er.extensions.ERXApplication.responseCompressionTypes | er.extensions.ERXApplication.responseCompressionTypes |
er.extensions.ERXApplication.rewriteDirectConnect | er.extensions.ERXApplication.rewriteDirectConnect |
er.extensions.ERXApplication.ssl.enabled | er.extensions.ERXApplication.ssl.enabled |
er.extensions.ERXApplication.ssl.host | er.extensions.ERXApplication.ssl.host |
er.extensions.ERXApplication.ssl.port | er.extensions.ERXApplication.ssl.port |
er.extensions.ERXApplication.traceOpenEditingContextLocks | er.extensions.ERXApplication.traceOpenEditingContextLocks |
er.extensions.ERXApplication.traceOpenEditingContextLocks | er.extensions.ERXApplication.traceOpenEditingContextLocks |
er.extensions.ERXApplication.useEditingContextUnlocker | er.extensions.ERXApplication.useEditingContextUnlocker |
er.extensions.ERXApplication.useEditingContextUnlocker | er.extensions.ERXApplication.useEditingContextUnlocker |
er.extensions.ERXApplication.useSessionStoreDeadlockDetection | er.extensions.ERXApplication.useSessionStoreDeadlockDetection |
er.extensions.ERXComponentActionRedirector.enabled | er.extensions.ERXComponentActionRedirector.enabled |
er.extensions.ERXApplication.allowMultipleDevInstances | er.extensions.ERXApplication.allowMultipleDevInstances |
| Modifier and Type | Class and Description |
|---|---|
static class |
ERXApplication.JarChecker
Utility class to track down duplicate items in the class path.
|
static class |
ERXApplication.Loader
Responsible for classpath munging and ensuring all bundles are loaded
|
ERXAjaxApplication.ERXAjaxResponseDelegateWOApplication._EventLoggingEnabler, WOApplication.Event, WOApplication.TimeoutTaskNSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.UtilityNSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessor| Modifier and Type | Field and Description |
|---|---|
protected static ERXFormatterFactory |
_formatterFactory |
protected boolean |
_initializedAdaptors
Tracks whether or not _addAdditionalAdaptors has been called yet.
|
protected WOTimer |
_killTimer |
protected java.math.BigDecimal |
_memoryLowThreshold
Holds the value of the property
er.extensions.ERXApplication.memoryLowThreshold
|
protected java.math.BigDecimal |
_memoryStarvedThreshold
Holds the value of the property
er.extensions.ERXApplication.memoryStarvedThreshold
|
protected java.lang.String |
_replaceApplicationPathPattern
The path rewriting pattern to match (@see _rewriteURL)
|
protected java.lang.String |
_replaceApplicationPathReplace
The path rewriting replacement to apply to the matched pattern (@see _rewriteURL)
|
protected java.lang.Boolean |
_responseCompressionEnabled |
protected NSSet<java.lang.String> |
_responseCompressionTypes |
protected java.lang.String |
_sslHost
The SSL host used by this application.
|
protected java.lang.Integer |
_sslPort
The SSL port used by this application.
|
protected NSMutableArray<java.lang.String> |
_streamingRequestHandlerKeys
improved streaming support
|
protected java.lang.Boolean |
_useSessionStoreDeadlockDetection
use the redirect feature
|
static java.lang.String |
AllBundlesLoadedNotification
Notification to post when all bundles were loaded but before their
principal was called
|
static java.lang.String |
ApplicationDidCreateNotification
Notification to post when all bundles were loaded but before their
principal was called
|
static java.lang.String |
ApplicationDidFinishInitializationNotification
Notification to post when all application initialization processes are complete (including migrations)
|
static java.lang.String |
ApplicationWillTerminateNotification
Notification to get posted when terminate() is called.
|
static java.lang.String |
AppShouldExitOnOutOfMemoryError
Property to control whether to exit on an OutOfMemoryError.
|
static org.apache.log4j.Logger |
log
logging support
|
static java.lang.String |
LowMemoryNotification
Notification to get posted when we get an OutOfMemoryError or when memory passes
the low memory threshold set in er.extensions.ERXApplication.memoryLowThreshold.
|
static java.lang.String |
LowMemoryResolvedNotification
Notification to get posted when we have recovered from a LowMemory condition.
|
protected static NSDictionary |
propertiesFromArgv |
static org.apache.log4j.Logger |
requestHandlingLog
request logging support
|
static org.apache.log4j.Logger |
startupLog
startup logging support
|
static java.lang.String |
StarvedMemoryNotification
Notification to get posted when we are on the brink of running out of memory.
|
static java.lang.String |
StarvedMemoryResolvedNotification
Notification to get posted when we have recovered from a StarvedMemory condition.
|
static org.apache.log4j.Logger |
statsLog
statistic logging support
|
protected java.lang.Boolean |
useComponentActionRedirection
use the redirect feature
|
KEY_AJAX_SUBMIT_BUTTON, KEY_PARTIAL_FORM_SENDER_ID, KEY_REPLACED, KEY_UPDATE_CONTAINER_ID_adminRequestHandlerKey, _cgiAdaptorURLParsed, _classPathURLs, _launchServices, _terminating, _TheLastApplicationAccessTime, _unsetHost, _wasMainInvoked, ApplicationDidDispatchRequestNotification, ApplicationDidFinishLaunchingNotification, ApplicationWillDispatchRequestNotification, ApplicationWillFinishLaunchingNotification, CGIAdaptorURLProperty, DirectoryAliasProperty, DocumentRootProperty_CLASS_CLASS, _KeyPathSeparatorChar, KeyPathSeparatorNullValue| Constructor and Description |
|---|
ERXApplication()
The ERXApplication constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
_addAdditionalAdaptors(NSMutableArray<NSDictionary<java.lang.String,java.lang.Object>> additionalAdaptors)
Injects additional adaptors into the WOAdditionalAdaptors setting.
|
com.webobjects.appserver._private.WOComponentDefinition |
_componentDefinition(java.lang.String s,
NSArray nsarray)
Bugfix for WO component loading.
|
protected WORequest |
_createRequest(java.lang.String aMethod,
java.lang.String aURL,
java.lang.String anHTTPVersion,
NSDictionary someHeaders,
NSData aContent,
NSDictionary someInfo)
Deprecated.
|
protected void |
_debugValueForDeclarationNamed(WOComponent component,
java.lang.String verb,
java.lang.String aDeclarationName,
java.lang.String aDeclarationType,
java.lang.String aBindingName,
java.lang.String anAssociationDescription,
java.lang.Object aValue) |
protected static boolean |
_defaultIsDevelopmentMode()
Returns whether or not this application is running in development-mode.
|
static void |
_endRequest()
Cleans up the current thread after a request is complete.
|
java.lang.String |
_newLocationForRequest(WORequest aRequest)
Called, for example, when refuse new sessions is enabled and the request contains an expired session.
|
java.lang.String |
_rewriteResourceURL(java.lang.String url,
com.webobjects.appserver._private.WODeployedBundle bundle)
This method is called by ERXResourceManager and provides the application a hook
to rewrite generated URLs for resources.
|
java.lang.String |
_rewriteURL(java.lang.String url)
This method is called by ERXWOContext and provides the application a hook
to rewrite generated URLs.
|
void |
_setSslHost(java.lang.String sslHost)
Sets an SSL host override.
|
void |
_setSslPort(int sslPort)
Sets an SSL port override (called back by the ERXSecureAdaptor)
|
static void |
_startRequest()
Initializes the current thread for a request.
|
java.lang.String[] |
adaptorExtensions()
Override default implementation that returns {".dll", ".exe"} and therefor prohibits IIS
as WebServer.
|
WOAdaptor |
adaptorWithName(java.lang.String aClassName,
NSDictionary<java.lang.String,java.lang.Object> anArgsDictionary) |
void |
addBalancerRouteCookie(WOContext context) |
void |
addBalancerRouteCookieByNotification(NSNotification notification) |
NSArray<NSDictionary<java.lang.String,java.lang.Object>> |
additionalAdaptors()
Returns the additionalAdaptors, but calls _addAdditionalAdaptors to give the runtime an opportunity to
programmatically force adaptors into the list.
|
void |
appendToResponse(WOResponse response,
WOContext context)
Overridden to allow for redirected responses.
|
protected void |
checkMemory()
Checks if the free memory is less than the threshold given in
er.extensions.ERXApplication.memoryStarvedThreshold (should be
set to around 0.90 meaning 90% of total memory or 100 meaning 100 MB of
minimal available memory) and if it is greater start to refuse new
sessions until more memory becomes available. |
protected boolean |
checkMemory(java.math.BigDecimal memoryThreshold,
boolean attemptGC) |
void |
clearDebugEnabledForAllComponents()
Turns off binding debugging for all components.
|
void |
configureStatisticsLogging()
Configures the statistics logging for a given application.
|
NSKeyValueCodingAdditions |
constants()
Makes ERXConstants available for binding in the UI.
|
WOContext |
createContextForRequest(WORequest request)
When a context is created we push it into thread local storage.
|
WORequest |
createRequest(java.lang.String aMethod,
java.lang.String aURL,
java.lang.String anHTTPVersion,
java.util.Map<java.lang.String,? extends java.util.List<java.lang.String>> someHeaders,
NSData aContent,
java.util.Map<java.lang.String,java.lang.Object> someInfo) |
WOResourceManager |
createResourceManager() |
WOResponse |
createResponseInContext(WOContext context) |
WOSession |
createSessionForRequest(WORequest worequest)
Overridden to check the sessions
|
boolean |
debugEnabledForComponent(java.lang.String componentName)
Returns whether or not binding debugging is enabled for the given component
|
ERXDelayedRequestHandler |
delayedRequestHandler()
Returns the delayedRequestHandler, if any is registered.
|
protected void |
didCreateApplication() |
void |
didFinishLaunching()
Called when the application posts
WOApplication.ApplicationDidFinishLaunchingNotification. |
void |
didFinishLaunching(NSNotification n)
Notification method called when the application posts the notification
WOApplication.ApplicationDidFinishLaunchingNotification. |
java.lang.String |
directConnectURL()
Returns the directConnecURL, optionally rewritten.
|
WOResponse |
dispatchRequest(WORequest request)
Overridden to allow for redirected responses and null the thread local
storage.
|
WOResponse |
dispatchRequestImmediately(WORequest request)
Dispatches the request without checking for the delayedRequestHandler()
|
protected static boolean |
enableERXShutdownHook() |
static java.lang.String |
erAjaxRequestHandlerKey()
Workaround for method missing in 5.3.
|
static ERXApplication |
erxApplication()
The ERXApplication singleton.
|
NSMutableDictionary |
extraInformationForExceptionInContext(java.lang.Exception e,
WOContext context)
Puts together a dictionary with a bunch of useful information relative to
the current state when the exception occurred.
|
void |
finishInitialization()
Called when the application posts
WOApplication.ApplicationWillFinishLaunchingNotification. |
void |
finishInitialization(NSNotification n)
Notification method called when the application posts the notification
WOApplication.ApplicationWillFinishLaunchingNotification. |
ERXFormatterFactory |
formatterFactory()
Getting formatters into KVC: bind to
application.formatterFactory.(60/#,##0.00) |
WOResponse |
genericHandleException(java.lang.Exception exception,
WOContext context)
Standard exception page.
|
void |
gracefulTerminate()
Override to perform any last minute cleanup before the application
terminates.
|
WOResponse |
handleActionRequestError(WORequest aRequest,
java.lang.Exception exception,
java.lang.String reason,
WORequestHandler aHandler,
java.lang.String actionClassName,
java.lang.String actionName,
java.lang.Class actionClass,
WOAction actionInstance)
Workaround for WO 5.2 DirectAction lock-ups.
|
WOResponse |
handleException(java.lang.Exception exception,
WOContext context)
Logs extra information about the current state.
|
void |
handlePotentiallyFatalException(java.lang.Exception exception)
Handles the potentially fatal OutOfMemoryError by quitting the
application ASAP.
|
void |
installPatches()
Installs several bugfixes and enhancements to WODynamicElements.
|
static WOComponent |
instantiatePage(java.lang.String pageName)
Used to instantiate a WOComponent when no context is available, typically
outside of a session
|
WOActionResults |
invokeAction(WORequest request,
WOContext context)
Overridden to allow for redirected responses.
|
boolean |
isDeployedAsServlet()
This heuristic to determine if an application is deployed as servlet relays on the fact,
that contextClassName() is set WOServletContext or ERXWOServletContext
|
boolean |
isDevelopmentMode()
Returns whether or not this application is running in development-mode.
|
static boolean |
isDevelopmentModeSafe()
Returns whether or not this application is in development mode.
|
static boolean |
isInRequest()
Returns true if the current thread is dispatching a request.
|
boolean |
isRefusingNewSessions()
Overridden to return the super value OR true if the app is memory starved.
|
boolean |
isStreamingRequestHandlerKey(java.lang.String s) |
static boolean |
isWO54()
Deprecated.
Wonder is used with WO 5.4 only
|
void |
killInstance()
Killing the instance will log a 'Forcing exit' message and then call
System.exit(1) |
void |
logSetValueForDeclarationNamed(java.lang.String aDeclarationName,
java.lang.String aDeclarationType,
java.lang.String aBindingName,
java.lang.String anAssociationDescription,
java.lang.Object aValue)
Little bit better binding debug output than the original.
|
void |
logTakeValueForDeclarationNamed(java.lang.String aDeclarationName,
java.lang.String aDeclarationType,
java.lang.String aBindingName,
java.lang.String anAssociationDescription,
java.lang.Object aValue)
Little bit better binding debug output than the original.
|
static void |
main(java.lang.String[] argv,
java.lang.Class applicationClass)
Called when the application starts up and saves the command line
arguments for
ERXConfigurationManager. |
protected void |
migrationsDidRun(ERXMigrator migrator)
Called after migrations finish running.
|
protected void |
migrationsWillRun(ERXMigrator migrator)
Called prior to migrations running.
|
ERXMigrator |
migrator()
Returns an ERXMigrator with the lock owner name "appname-instancenumber".
|
java.lang.String |
name()
Adds the ability to completely change the applications name by setting
the System property ERApplicationName.
|
java.lang.String |
nameSuffix()
The name suffix is appended to the current name of the application.
|
<T extends WOComponent> |
pageWithName(java.lang.Class<T> componentClass)
Calls pageWithName with ERXWOContext.currentContext() for the current
thread.
|
<T extends WOComponent> |
pageWithName(java.lang.Class<T> componentClass,
WOContext context)
Returns the component for the given class without having to cast.
|
java.lang.String |
rawName()
This method returns
WOApplication's name method. |
void |
refuseNewSessions(boolean value)
Overridden to fix that direct connect apps can't refuse new sessions.
|
protected boolean |
refuseSessionsOnStarvedMemory()
Override and return false if you do not want sessions to be refused when memory is starved.
|
void |
registerStreamingRequestHandlerKey(java.lang.String s) |
WOResponse |
reportException(java.lang.Throwable exception,
WOContext context,
NSDictionary extraInfo)
Reports an exception.
|
boolean |
responseCompressionEnabled()
checks the value of
er.extensions.ERXApplication.responseCompressionEnabled
and if true turns on response compression by gzip |
NSSet<java.lang.String> |
responseCompressionTypes()
checks the value of
er.extensions.ERXApplication.responseCompressionTypes for
mime types that allow response compression in addition to text/* types. |
WOSession |
restoreSessionWithID(java.lang.String sessionID,
WOContext wocontext)
Overridden to check the sessions
|
boolean |
rewriteDirectConnectURL()
Returns whether or not to rewrite direct connect URLs.
|
void |
run()
Adds support for automatic application cycling.
|
void |
saveSessionForContext(WOContext wocontext)
Overridden to check the sessions
|
java.lang.Number |
sessionTimeOutInMinutes() |
void |
setDebugEnabledForComponent(boolean debugEnabled,
java.lang.String componentName)
Turns on/off binding debugging for the given component.
|
void |
setDefaultEncoding(java.lang.String encoding)
Set the default encoding of the app (message encodings)
|
static void |
setup(java.lang.String[] argv)
Called prior to actually initializing the app.
|
boolean |
sslEnabled()
Returns whether or not DirectConnect SSL should be enabled.
|
java.lang.String |
sslHost()
Returns the host name that will be used to bind the SSL socket to (defaults to host()).
|
int |
sslPort()
Returns the SSL port that will be used for DirectConnect SSL (defaults to 443).
|
void |
startRefusingSessions()
Stops the application from handling any new requests.
|
void |
terminate()
Sends out a ApplicationWillTerminateNotification before actually starting to terminate.
|
java.lang.Boolean |
traceOpenEditingContextLocks()
Deprecated.
|
boolean |
useComponentActionRedirection()
Set the
er.extensions.ERXComponentActionRedirector.enabled=true
property to actually the redirect feature. |
java.lang.Boolean |
useEditingContextUnlocker()
Deprecated.
|
boolean |
useSessionStoreDeadlockDetection()
Deadlock in session-store detection.
|
ajaxSubmitButtonName, cleanUpHeaders, enableShouldNotStorePage, forceStorePage, isAjaxReplacement, isAjaxRequest, isAjaxSubmit, isAjaxUpdate, partialFormSenderID, setForceStorePage, setResponseDelegate, shouldIgnoreResults, shouldNotStorePage, shouldNotStorePage, takeValuesFromRequest_addToExpectedLanguages, _allowsCacheControlHeader, _checksForSpecialHeaders, _componentDefinitionFromClassNamed, _debugString, _discountTerminatedSession, _expectedLanguages, _finishInitializingSession, _initializeSessionInContext, _isDebuggingEnabled, _isDomesticSupportedDevelopmentPlatform, _isForeignSupportedDevelopmentPlatform, _isPageRecreationEnabled, _isSupportedDevelopmentPlatform, _lockDefaultEditingContext, _openInitialURL, _parseCGIAdaptorURL, _quitTimer, _rapidTurnaroundActiveForAnyProject, _removeComponentDefinitionCacheContents, _runLoop, _sessionClass, _setAllowsCacheControlHeader, _setChecksForSpecialHeaders, _setHost, _setHostAddress, _setLifebeatDestinationPort, _setLockDefaultEditingContext, _terminateFromMonitor, _terminateOrResetTimer, activeSessionsCount, adaptor, adaptorName, adaptorPath, adaptors, adaptorsDispatchRequestsConcurrently, ajaxRequestHandlerKey, allowsConcurrentRequestHandling, application, applicationBaseURL, applicationExtension, associationFactory, associationFactoryRegistry, autoOpenClientApplication, autoOpenInBrowser, awake, baseURL, canAccessFieldsDirectly, cgiAdaptorURL, combinedComponentPathURL, componentRequestHandlerKey, contextClassName, createDefaultAssociationFactoryRegistry, createDefaultNamespaceProvider, debugString, defaultAdaptor, defaultRequestHandler, defaultRequestHandlerClassName, defaultUndoStackLimit, directActionRequestHandlerKey, documentRoot, dynamicElementWithName, frameworksBaseURL, getAdaptorsDispatchRequestsConcurrently, getAdditionalAdaptors, getAgentID, getAllowsConcurrentRequestHandling, getApplicationBaseURL, getApplicationExtension, getAutoOpenClientApplication, getBaseURL, getCGIAdaptorURL, getClassPaths, getComponentRequestHandlerKey, getDefaultAdaptor, getDefaultUndoStackLimit, getDirectConnectURL, getFrameworkVersions, getHost, getHostAddress, getIncludeCommentsInResponses, getIsCachingEnabled, getIsMonitorEnabled, getIsPageRefreshOnBacktrackEnabled, getIsRefusingNewSessions, getIsTerminating, getJMXDomain, getLifebeatDestinationPort, getLifebeatInterval, getListenQueueSize, getMaxSocketIdleTime, getMBeanServer, getMinimumActiveSessionsCount, getName, getOutputPath, getPageCacheSize, getPageFragmentCacheSize, getPort, getServletConnectURL, getSessionTimeOut, getTimeOut, getWebObjectsVersion, getWebserverConnectURL, getWorkerThreadCountMax, getWorkerThreadCountMin, handleMalformedCookieString, handlePageRestorationErrorInContext, handleQueryWithUnboundKey, handlerForRequest, handleSessionCreationErrorInContext, handleSessionRestorationErrorInContext, handleTakeValueForUnboundKey, host, hostAddress, includeCommentsInResponses, instanceIdKey, isCachingEnabled, isConcurrentRequestHandlingEnabled, isDebuggingEnabled, isDirectConnectEnabled, isMonitorEnabled, isPageRefreshOnBacktrackEnabled, isTerminating, launchArguments, licensedRequestLimit, licensedRequestWindow, licensingAllowsMultipleInstances, licensingAllowsMultipleThreads, lifebeatDestinationPort, lifebeatEnabled, lifebeatInterval, listenQueueSize, loadFrameworks, lock, logString, main, maxSocketIdleTime, minimumActiveSessionsCount, monitorEnabled, monitorHost, monitoringEnabled, namespaceProvider, newDynamicURL, newDynamicURL, number, outputPath, pageCacheSize, pageFragmentCacheSize, pageWithName, path, permanentPageCacheSize, port, primeApplication, primeApplication, printsHTMLParserDiagnostics, projectSearchPath, recordingPath, registeredRequestHandlerKeys, registerMBean, registerMBean, registerRequestHandler, removeRequestHandlerForKey, requestHandlerForKey, requestHandlingLock, resourceManager, resourceRequestHandlerKey, responseForComponentWithName, responseForDirectActionWithNameAndClass, servletConnectURL, sessionIdKey, sessionStore, sessionStoreClassName, sessionTimeOut, setAdaptor, setAdditionalAdaptors, setAllowsConcurrentRequestHandling, setApplicationBaseURL, setAutoOpenClientApplication, setAutoOpenInBrowser, setCachingEnabled, setCGIAdaptorURL, setComponentRequestHandlerKey, setContextClassName, setDefaultRequestHandler, setDefaultUndoStackLimit, setDirectActionRequestHandlerKey, setDirectConnectEnabled, setFrameworksBaseURL, setIncludeCommentsInResponses, setJMXDomain, setListenQueueSize, setLoadFrameworks, setMaxSocketIdleTime, setMinimumActiveSessionsCount, setMonitorEnabled, setMonitorHost, setNamespaceProvider, setPageCacheSize, setPageFragmentCacheSize, setPageRefreshOnBacktrackEnabled, setPermanentPageCacheSize, setPort, setPrintsHTMLParserDiagnostics, setProjectSearchPath, setRecordingPath, setResourceManager, setResourceRequestHandlerKey, setSessionStore, setSessionStoreClassName, setSessionTimeOut, setSMTPHost, setSocketCacheSize, setSocketMonitorSleepTime, setStatisticsStore, setTimeOut, setWebServiceRequestHandlerKey, setWorkerThreadCount, setWorkerThreadCountMax, setWorkerThreadCountMin, sharedEditingContext, shouldRestoreSessionOnCleanEntry, sleep, SMTPHost, socketCacheSize, socketMonitorSleepTime, statistics, statisticsStore, streamActionRequestHandlerKey, takeValueForKey, takeValueForKeyPath, terminateAfterTimeInterval, timeOut, toString, unableToSetNullForKey, unlock, unregisterMBean, validationFailedWithException, valueForKey, valueForKeyPath, wasMainInvoked, webserverConnectURL, webServiceRequestHandlerKey, workerThreadCount, workerThreadCountMax, workerThreadCountMinpublic static final org.apache.log4j.Logger log
public static final org.apache.log4j.Logger requestHandlingLog
public static final org.apache.log4j.Logger statsLog
public static final org.apache.log4j.Logger startupLog
public static final java.lang.String LowMemoryNotification
public static final java.lang.String LowMemoryResolvedNotification
public static final java.lang.String StarvedMemoryNotification
public static final java.lang.String StarvedMemoryResolvedNotification
public static final java.lang.String ApplicationWillTerminateNotification
public static final java.lang.String AppShouldExitOnOutOfMemoryError
public static final java.lang.String AllBundlesLoadedNotification
public static final java.lang.String ApplicationDidCreateNotification
public static final java.lang.String ApplicationDidFinishInitializationNotification
protected static NSDictionary propertiesFromArgv
protected java.math.BigDecimal _memoryStarvedThreshold
protected java.math.BigDecimal _memoryLowThreshold
protected java.lang.String _replaceApplicationPathPattern
protected java.lang.String _replaceApplicationPathReplace
protected java.lang.String _sslHost
protected java.lang.Integer _sslPort
protected boolean _initializedAdaptors
protected WOTimer _killTimer
protected java.lang.Boolean useComponentActionRedirection
protected NSMutableArray<java.lang.String> _streamingRequestHandlerKeys
protected java.lang.Boolean _useSessionStoreDeadlockDetection
protected static final ERXFormatterFactory _formatterFactory
protected java.lang.Boolean _responseCompressionEnabled
protected NSSet<java.lang.String> _responseCompressionTypes
protected static boolean enableERXShutdownHook()
public static void main(java.lang.String[] argv,
java.lang.Class applicationClass)
ERXConfigurationManager.WOApplication.main(String[], Class)public boolean isDeployedAsServlet()
public static void setup(java.lang.String[] argv)
public void installPatches()
public WOResourceManager createResourceManager()
createResourceManager in class WOApplicationpublic java.lang.String _newLocationForRequest(WORequest aRequest)
_newLocationForRequest in class WOApplicationWOApplication._newLocationForRequest(com.webobjects.appserver.WORequest)@Deprecated public java.lang.Boolean useEditingContextUnlocker()
ERXEC.useUnlocker()@Deprecated public java.lang.Boolean traceOpenEditingContextLocks()
ERXEC.traceOpenLocks()public void configureStatisticsLogging()
er.extensions.ERXApplication.StatisticsBaseLogPath
The default log rotation frequency is 24 hours, but can be changed by
setting in milliseconds the property
er.extensions.ERXApplication.StatisticsLogRotationFrequencypublic final void finishInitialization(NSNotification n)
WOApplication.ApplicationWillFinishLaunchingNotification. This
method calls subclasses' finishInitialization(com.webobjects.foundation.NSNotification) method.n - notification that is posted after the WOApplication has been
constructed, but before the application is ready for accepting
requests.protected void migrationsWillRun(ERXMigrator migrator)
migrator - the migrator that will be usedprotected void migrationsDidRun(ERXMigrator migrator)
migrator - the migrator that was usedpublic final void didFinishLaunching(NSNotification n)
WOApplication.ApplicationDidFinishLaunchingNotification. This
method calls subclasse's didFinishLaunching(com.webobjects.foundation.NSNotification) method.n - notification that is posted after the WOApplication has
finished launching and is ready for accepting requests.public void finishInitialization()
WOApplication.ApplicationWillFinishLaunchingNotification.
Override this to perform application initialization. (optional)protected void didCreateApplication()
public void didFinishLaunching()
WOApplication.ApplicationDidFinishLaunchingNotification.
Override this to perform application specific tasks after the application
has been initialized. THis is a good spot to perform batch application
tasks.public static ERXApplication erxApplication()
WOApplication.application() cast as an
ERXApplicationpublic void run()
The first way is by setting
the System property ERTimeToLive to the number of seconds (+ a
random interval of 10 minutes) that the application should be up before
terminating. Note that when the application's time to live is up it will
quit calling the method killInstance.
The second way is by setting the System property ERTimeToDie to the time in seconds after midnight when the app should be starting to refuse new sessions. In this case when the application starts to refuse new sessions it will also register a kill timer that will terminate the application between 0 minutes and 1:00 minutes.
run in class WOApplicationpublic WORequest createRequest(java.lang.String aMethod, java.lang.String aURL, java.lang.String anHTTPVersion, java.util.Map<java.lang.String,? extends java.util.List<java.lang.String>> someHeaders, NSData aContent, java.util.Map<java.lang.String,java.lang.Object> someInfo)
createRequest in class WOApplication@Deprecated protected WORequest _createRequest(java.lang.String aMethod, java.lang.String aURL, java.lang.String anHTTPVersion, NSDictionary someHeaders, NSData aContent, NSDictionary someInfo)
createRequest(String, String, String, Map, NSData, Map) insteadpublic static WOComponent instantiatePage(java.lang.String pageName)
pageName - -
The name of the WOComponent that must be instantiated.public void startRefusingSessions()
public com.webobjects.appserver._private.WOComponentDefinition _componentDefinition(java.lang.String s, NSArray nsarray)
er.extensions.ERXApplication.fixCachingEnabled=false is
you don't want it to load._componentDefinition in class WOApplicationprotected void checkMemory()
Checks if the free memory is less than the threshold given in
er.extensions.ERXApplication.memoryStarvedThreshold (should be
set to around 0.90 meaning 90% of total memory or 100 meaning 100 MB of
minimal available memory) and if it is greater start to refuse new
sessions until more memory becomes available. This helps when the
application is becoming unresponsive because it's more busy garbage
collecting than processing requests. The default is to do nothing unless
the property is set. This method is called on each request, but garbage
collection will be done only every minute.
Additionally, you can set er.extensions.ERXApplication.memoryLowThreshold, which
you can set at a higher "warning" level, before the situation is critical.
Both of these methods post notifications both at the start of the event as well as the end of the event (LowMemoryNotification/LowMemoryResolvedNotification and StarvedMemoryNotification and StarvedMemoryResolvedNotification).
protected boolean checkMemory(java.math.BigDecimal memoryThreshold,
boolean attemptGC)
protected boolean refuseSessionsOnStarvedMemory()
public boolean isRefusingNewSessions()
isRefusingNewSessions in class WOApplicationpublic void refuseNewSessions(boolean value)
refuseNewSessions in class WOApplicationpublic void killInstance()
System.exit(1)public java.lang.String nameSuffix()
The name suffix is set via the System property ERApplicationNameSuffix. For example if the name of an application is Buyer and you want to have a training instance appear with the name BuyerTraining then you would set the ERApplicationNameSuffix to Training.
nullpublic java.lang.String name()
nameSuffix if one is set.name in class WOApplicationpublic java.lang.String rawName()
WOApplication's name method.public NSMutableDictionary extraInformationForExceptionInContext(java.lang.Exception e, WOContext context)
e - exceptioncontext - the current contextpublic WOResponse reportException(java.lang.Throwable exception, WOContext context, NSDictionary extraInfo)
exception - to be reportedcontext - for the exceptionextraInfo - dictionary of extra information about what was happening when
the exception was thrown.handleException(Exception, WOContext) is
calledpublic WOResponse handleActionRequestError(WORequest aRequest, java.lang.Exception exception, java.lang.String reason, WORequestHandler aHandler, java.lang.String actionClassName, java.lang.String actionName, java.lang.Class actionClass, WOAction actionInstance)
public WOResponse handleException(java.lang.Exception exception, WOContext context)
handleException in class WOApplicationexception - to be handledcontext - current contextpublic WOResponse genericHandleException(java.lang.Exception exception, WOContext context)
exception - to be handledcontext - current contextpublic void handlePotentiallyFatalException(java.lang.Exception exception)
exception - to check if it is a fatal exception.public boolean useComponentActionRedirection()
er.extensions.ERXComponentActionRedirector.enabled=true
property to actually the redirect feature.public WOActionResults invokeAction(WORequest request, WOContext context)
invokeAction in class ERXAjaxApplicationrequest - objectcontext - objectpublic void appendToResponse(WOResponse response, WOContext context)
appendToResponse in class WOApplicationresponse - objectcontext - objectpublic static void _startRequest()
public static void _endRequest()
public static boolean isInRequest()
public ERXDelayedRequestHandler delayedRequestHandler()
public WOResponse dispatchRequest(WORequest request)
dispatchRequest in class WOApplicationrequest - objectpublic WOResponse dispatchRequestImmediately(WORequest request)
request - public WOContext createContextForRequest(WORequest request)
createContextForRequest in class WOApplicationrequest - the requestpublic WOResponse createResponseInContext(WOContext context)
createResponseInContext in class WOApplicationpublic void gracefulTerminate()
ERXGracefulShutdown for where
this is called if signal handling is enabled. Default implementation
calls terminate.gracefulTerminate in interface ERXGracefulShutdown.GracefulApplicationpublic void registerStreamingRequestHandlerKey(java.lang.String s)
public boolean isStreamingRequestHandlerKey(java.lang.String s)
public boolean useSessionStoreDeadlockDetection()
er.extensions.ERXApplication.useSessionStoreDeadlockDetection=true
property to actually the this feature.@Deprecated public static boolean isWO54()
public static boolean isDevelopmentModeSafe()
protected static boolean _defaultIsDevelopmentMode()
public boolean isDevelopmentMode()
true if application is in dev modepublic WOSession createSessionForRequest(WORequest worequest)
createSessionForRequest in class WOApplicationpublic void saveSessionForContext(WOContext wocontext)
saveSessionForContext in class WOApplicationpublic WOSession restoreSessionWithID(java.lang.String sessionID, WOContext wocontext)
restoreSessionWithID in class WOApplicationpublic java.lang.Number sessionTimeOutInMinutes()
public ERXFormatterFactory formatterFactory()
application.formatterFactory.(60/#,##0.00)public boolean responseCompressionEnabled()
er.extensions.ERXApplication.responseCompressionEnabled
and if true turns on response compression by gzippublic NSSet<java.lang.String> responseCompressionTypes()
er.extensions.ERXApplication.responseCompressionTypes for
mime types that allow response compression in addition to text/* types.
The default is ("application/x-javascript")public ERXMigrator migrator()
public java.lang.String _rewriteURL(java.lang.String url)
er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi-bin/WebObjects/YourApp.woa
er.extensions.ERXApplication.replaceApplicationPath.replace=/yourapp
and in Apache 2.2:
RewriteRule ^/yourapp(.*)$ /cgi-bin/WebObjects/YourApp.woa$1 [PT,L]
or Apache 1.3:
RewriteRule ^/yourapp(.*)$ /cgi-bin/WebObjects/YourApp.woa$1 [P,L]
url - the URL to rewritepublic java.lang.String _rewriteResourceURL(java.lang.String url,
com.webobjects.appserver._private.WODeployedBundle bundle)
url - the URL to rewritebundle - the bundle the resource is located inpublic boolean rewriteDirectConnectURL()
public java.lang.String directConnectURL()
directConnectURL in class WOApplicationpublic void setDefaultEncoding(java.lang.String encoding)
encoding - public <T extends WOComponent> T pageWithName(java.lang.Class<T> componentClass, WOContext context)
T - the type of component tocomponentClass - the component class to lookupcontext - the contextpublic <T extends WOComponent> T pageWithName(java.lang.Class<T> componentClass)
T - the type of component tocomponentClass - the component class to lookuppublic NSKeyValueCodingAdditions constants()
application.constants.MyConstantClass.public boolean sslEnabled()
| Properties | |
er.extensions.ERXApplication.ssl.enabled | er.extensions.ERXApplication.ssl.enabled |
public java.lang.String sslHost()
| Properties | |
er.extensions.ERXApplication.ssl.host | er.extensions.ERXApplication.ssl.host |
public void _setSslHost(java.lang.String sslHost)
sslHost - an SSL host overridepublic int sslPort()
| Properties | |
er.extensions.ERXApplication.ssl.port | er.extensions.ERXApplication.ssl.port |
public void _setSslPort(int sslPort)
sslPort - an ssl port overrideprotected void _addAdditionalAdaptors(NSMutableArray<NSDictionary<java.lang.String,java.lang.Object>> additionalAdaptors)
additionalAdaptors - the mutable adaptors arraypublic NSArray<NSDictionary<java.lang.String,java.lang.Object>> additionalAdaptors()
additionalAdaptors in class WOApplicationpublic WOAdaptor adaptorWithName(java.lang.String aClassName, NSDictionary<java.lang.String,java.lang.Object> anArgsDictionary)
adaptorWithName in class WOApplicationprotected void _debugValueForDeclarationNamed(WOComponent component, java.lang.String verb, java.lang.String aDeclarationName, java.lang.String aDeclarationType, java.lang.String aBindingName, java.lang.String anAssociationDescription, java.lang.Object aValue)
public void logTakeValueForDeclarationNamed(java.lang.String aDeclarationName,
java.lang.String aDeclarationType,
java.lang.String aBindingName,
java.lang.String anAssociationDescription,
java.lang.Object aValue)
logTakeValueForDeclarationNamed in class WOApplicationpublic void logSetValueForDeclarationNamed(java.lang.String aDeclarationName,
java.lang.String aDeclarationType,
java.lang.String aBindingName,
java.lang.String anAssociationDescription,
java.lang.Object aValue)
logSetValueForDeclarationNamed in class WOApplicationpublic void setDebugEnabledForComponent(boolean debugEnabled,
java.lang.String componentName)
debugEnabled - whether or not to enable debuggingcomponentName - the component name to enable debugging forpublic boolean debugEnabledForComponent(java.lang.String componentName)
componentName - the component namepublic void clearDebugEnabledForAllComponents()
public static java.lang.String erAjaxRequestHandlerKey()
public void terminate()
terminate in class WOApplicationpublic java.lang.String[] adaptorExtensions()
adaptorExtensions in class WOApplicationpublic void addBalancerRouteCookieByNotification(NSNotification notification)
public void addBalancerRouteCookie(WOContext context)
Copyright © 2002 – 2022 Project Wonder.