|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webobjects.appserver.WOApplication
er.extensions.appserver.ajax.ERXAjaxApplication
er.extensions.appserver.ERXApplication
public abstract class ERXApplication
ERXApplication is the abstract superclass of WebObjects applications built
with the ER frameworks.
Useful enhancements include the ability
to change the deployed name of the application, support for automatic
application restarting at given intervals and more context information when
handling exceptions.
Nested Class Summary | |
---|---|
static class |
ERXApplication.JarChecker
Utility class to track down duplicate items in the class path. |
static class |
ERXApplication.Loader
Responsible for classpath munging. |
Nested classes/interfaces inherited from class er.extensions.appserver.ajax.ERXAjaxApplication |
---|
ERXAjaxApplication.ERXAjaxResponseDelegate |
Nested classes/interfaces inherited from class com.webobjects.appserver.WOApplication |
---|
com.webobjects.appserver.WOApplication._EventLoggingEnabler, com.webobjects.appserver.WOApplication.Event |
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
---|
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility |
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding |
---|
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor |
Field Summary | |
---|---|
protected static ERXFormatterFactory |
_formatterFactory
|
protected boolean |
_initializedAdaptors
Tracks whether or not _addAdditionalAdaptors has been called yet. |
protected com.webobjects.appserver.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 com.webobjects.foundation.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 com.webobjects.foundation.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 com.webobjects.foundation.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 |
Fields inherited from class er.extensions.appserver.ajax.ERXAjaxApplication |
---|
KEY_AJAX_SUBMIT_BUTTON, KEY_PARTIAL_FORM_SENDER_ID, KEY_REPLACED, KEY_UPDATE_CONTAINER_ID |
Fields inherited from class com.webobjects.appserver.WOApplication |
---|
_adminRequestHandlerKey, _TheLastApplicationAccessTime, _unsetHost, _wasMainInvoked, ApplicationDidDispatchRequestNotification, ApplicationDidFinishLaunchingNotification, ApplicationWillDispatchRequestNotification, ApplicationWillFinishLaunchingNotification |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling |
---|
_CLASS |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
---|
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding |
---|
NullValue |
Constructor Summary | |
---|---|
ERXApplication()
The ERXApplication contructor. |
Method Summary | ||
---|---|---|
protected void |
_addAdditionalAdaptors(com.webobjects.foundation.NSMutableArray<com.webobjects.foundation.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,
com.webobjects.foundation.NSArray nsarray)
Bugfix for WO component loading. |
|
protected com.webobjects.appserver.WORequest |
_createRequest(java.lang.String aMethod,
java.lang.String aURL,
java.lang.String anHTTPVersion,
com.webobjects.foundation.NSDictionary someHeaders,
com.webobjects.foundation.NSData aContent,
com.webobjects.foundation.NSDictionary someInfo)
Bottleneck for WORequest creation in WO 5.3 and 5.4 to use an ERXRequest object that fixes a bug with localization. |
|
protected void |
_debugValueForDeclarationNamed(com.webobjects.appserver.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(com.webobjects.appserver.WORequest aRequest)
Called, for example, when refuse new sessions is enabled and the request contains an expired session. |
|
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. |
|
com.webobjects.foundation.NSArray<com.webobjects.foundation.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(com.webobjects.appserver.WOResponse response,
com.webobjects.appserver.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. |
|
com.webobjects.foundation.NSKeyValueCodingAdditions |
constants()
Makes ERXConstants available for binding in the UI. |
|
com.webobjects.appserver.WOContext |
createContextForRequest(com.webobjects.appserver.WORequest request)
When a context is created we push it into thread local storage. |
|
com.webobjects.appserver.WORequest |
createRequest(java.lang.String method,
java.lang.String aurl,
java.lang.String anHTTPVersion,
java.util.Map<java.lang.String,? extends java.util.List<java.lang.String>> someHeaders,
com.webobjects.foundation.NSData content,
java.util.Map<java.lang.String,java.lang.Object> someInfo)
Creates the request object for this loop. |
|
com.webobjects.appserver.WORequest |
createRequest(java.lang.String aMethod,
java.lang.String aURL,
java.lang.String anHTTPVersion,
com.webobjects.foundation.NSDictionary someHeaders,
com.webobjects.foundation.NSData aContent,
com.webobjects.foundation.NSDictionary someInfo)
Creates the request object for this loop. |
|
com.webobjects.appserver.WOResourceManager |
createResourceManager()
|
|
com.webobjects.appserver.WOResponse |
createResponseInContext(com.webobjects.appserver.WOContext context)
|
|
com.webobjects.appserver.WOSession |
createSessionForRequest(com.webobjects.appserver.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. |
|
void |
didFinishLaunching()
Called when the application posts WOApplication.ApplicationDidFinishLaunchingNotification . |
|
void |
didFinishLaunching(com.webobjects.foundation.NSNotification n)
Notification method called when the application posts the notification WOApplication.ApplicationDidFinishLaunchingNotification . |
|
java.lang.String |
directConnectURL()
Returns the directConnecURL, optionally rewritten. |
|
com.webobjects.appserver.WOResponse |
dispatchRequest(com.webobjects.appserver.WORequest request)
Overridden to allow for redirected responses and null the thread local storage. |
|
com.webobjects.appserver.WOResponse |
dispatchRequestImmediately(com.webobjects.appserver.WORequest request)
Dispatches the request without checking for the delayedRequestHandler() |
|
static java.lang.String |
erAjaxRequestHandlerKey()
Workaround for method missing in 5.3. |
|
static ERXApplication |
erxApplication()
The ERXApplication singleton. |
|
com.webobjects.foundation.NSMutableDictionary |
extraInformationForExceptionInContext(java.lang.Exception e,
com.webobjects.appserver.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(com.webobjects.foundation.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) |
|
com.webobjects.appserver.WOResponse |
genericHandleException(java.lang.Exception exception,
com.webobjects.appserver.WOContext context)
Standard exception page. |
|
void |
gracefulTerminate()
Override to perform any last minute cleanup before the application terminates. |
|
com.webobjects.appserver.WOResponse |
handleActionRequestError(com.webobjects.appserver.WORequest aRequest,
java.lang.Exception exception,
java.lang.String reason,
com.webobjects.appserver.WORequestHandler aHandler,
java.lang.String actionClassName,
java.lang.String actionName,
java.lang.Class actionClass,
com.webobjects.appserver.WOAction actionInstance)
Workaround for WO 5.2 DirectAction lock-ups. |
|
com.webobjects.appserver.WOResponse |
handleException(java.lang.Exception exception,
com.webobjects.appserver.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 bufixes and enhancements to WODynamicElements. |
|
static com.webobjects.appserver.WOComponent |
instantiatePage(java.lang.String pageName)
Used to instantiate a WOComponent when no context is available, typically outside of a session |
|
com.webobjects.appserver.WOActionResults |
invokeAction(com.webobjects.appserver.WORequest request,
com.webobjects.appserver.WOContext context)
Overridden to allow for redirected responses. |
|
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()
Returns true if this app is running in WO 5.4. |
|
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. |
|
|
pageWithName(java.lang.Class<T> componentClass)
Calls pageWithName with ERXWOContext.currentContext() for the current thread. |
|
|
pageWithName(java.lang.Class<T> componentClass,
com.webobjects.appserver.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)
|
|
com.webobjects.appserver.WOResponse |
reportException(java.lang.Throwable exception,
com.webobjects.appserver.WOContext context,
com.webobjects.foundation.NSDictionary extraInfo)
Reports an exception. |
|
boolean |
responseCompressionEnabled()
checks the value of er.extensions.ERXApplication.responseCompressionEnabled
and if true turns on response compression by gzip |
|
com.webobjects.foundation.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. |
|
com.webobjects.appserver.WOSession |
restoreSessionWithID(java.lang.String sessionID,
com.webobjects.appserver.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(com.webobjects.appserver.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. use er.extensions.ERXEC.traceOpenLocks property instead |
|
boolean |
useComponentActionRedirection()
Set the er.extensions.ERXComponentActionRedirector.enabled=true
property to actually the redirect feature. |
|
java.lang.Boolean |
useEditingContextUnlocker()
Deprecated. use er.extensions.ERXEC.useUnlocker property instead |
|
boolean |
useSessionStoreDeadlockDetection()
Deadlock in session-store detection. |
Methods inherited from class er.extensions.appserver.ajax.ERXAjaxApplication |
---|
ajaxSubmitButtonName, cleanUpHeaders, forceStorePage, isAjaxReplacement, isAjaxRequest, isAjaxSubmit, isAjaxUpdate, partialFormSenderID, setForceStorePage, setResponseDelegate, shouldIgnoreResults, shouldNotStorePage, shouldNotStorePage, takeValuesFromRequest |
Methods inherited from class com.webobjects.appserver.WOApplication |
---|
_addToExpectedLanguages, _allowsCacheControlHeader, _checksForSpecialHeaders, _componentDefinitionFromClassNamed, _debugString, _discountTerminatedSession, _expectedLanguages, _finishInitializingSession, _initializeSessionInContext, _isDebuggingEnabled, _isDomesticSupportedDevelopmentPlatform, _isForeignSupportedDevelopmentPlatform, _isPageRecreationEnabled, _isSupportedDevelopmentPlatform, _lockDefaultEditingContext, _openInitialURL, _quitTimer, _rapidTurnaroundActiveForAnyProject, _removeComponentDefinitionCacheContents, _runLoop, _sessionClass, _setAllowsCacheControlHeader, _setChecksForSpecialHeaders, _setHost, _setHostAddress, _setLifebeatDestinationPort, _setLockDefaultEditingContext, _terminateFromMonitor, _terminateOrResetTimer, activeSessionsCount, adaptor, adaptors, adaptorsDispatchRequestsConcurrently, adaptorWithName, allowsConcurrentRequestHandling, application, applicationBaseURL, autoOpenClientApplication, autoOpenInBrowser, awake, baseURL, canAccessFieldsDirectly, cgiAdaptorURL, componentRequestHandlerKey, contextClassName, debugString, defaultRequestHandler, defaultRequestHandlerClassName, defaultUndoStackLimit, directActionRequestHandlerKey, dynamicElementWithName, frameworksBaseURL, handleMalformedCookieString, handlePageRestorationErrorInContext, handleQueryWithUnboundKey, handlerForRequest, handleSessionCreationErrorInContext, handleSessionRestorationErrorInContext, handleTakeValueForUnboundKey, host, hostAddress, includeCommentsInResponses, isCachingEnabled, isConcurrentRequestHandlingEnabled, isDebuggingEnabled, isDirectConnectEnabled, isMonitorEnabled, isPageRefreshOnBacktrackEnabled, isTerminating, licensedRequestLimit, licensedRequestWindow, licensingAllowsMultipleInstances, licensingAllowsMultipleThreads, lifebeatDestinationPort, lifebeatEnabled, lifebeatInterval, listenQueueSize, loadFrameworks, lock, logString, main, maxSocketIdleTime, minimumActiveSessionsCount, monitorEnabled, monitorHost, monitoringEnabled, number, outputPath, pageCacheSize, pageWithName, path, permanentPageCacheSize, port, primeApplication, primeApplication, printsHTMLParserDiagnostics, projectSearchPath, recordingPath, registeredRequestHandlerKeys, registerRequestHandler, removeRequestHandlerForKey, requestHandlerForKey, requestHandlingLock, resourceManager, resourceRequestHandlerKey, responseForComponentWithName, responseForDirectActionWithNameAndClass, servletConnectURL, sessionStore, sessionStoreClassName, sessionTimeOut, setAdaptor, setAdditionalAdaptors, setAllowsConcurrentRequestHandling, setApplicationBaseURL, setAutoOpenClientApplication, setAutoOpenInBrowser, setCachingEnabled, setCGIAdaptorURL, setComponentRequestHandlerKey, setContextClassName, setDefaultRequestHandler, setDefaultUndoStackLimit, setDirectActionRequestHandlerKey, setDirectConnectEnabled, setFrameworksBaseURL, setIncludeCommentsInResponses, setListenQueueSize, setLoadFrameworks, setMaxSocketIdleTime, setMinimumActiveSessionsCount, setMonitorEnabled, setMonitorHost, setPageCacheSize, 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, validationFailedWithException, valueForKey, valueForKeyPath, wasMainInvoked, webserverConnectURL, webServiceRequestHandlerKey, workerThreadCount, workerThreadCountMax, workerThreadCountMin |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public 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 com.webobjects.foundation.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 com.webobjects.appserver.WOTimer _killTimer
protected java.lang.Boolean useComponentActionRedirection
protected com.webobjects.foundation.NSMutableArray<java.lang.String> _streamingRequestHandlerKeys
protected java.lang.Boolean _useSessionStoreDeadlockDetection
protected static final ERXFormatterFactory _formatterFactory
protected java.lang.Boolean _responseCompressionEnabled
protected com.webobjects.foundation.NSSet<java.lang.String> _responseCompressionTypes
Constructor Detail |
---|
public ERXApplication()
Method Detail |
---|
public static void main(java.lang.String[] argv, java.lang.Class applicationClass)
ERXConfigurationManager
.
WOApplication.main(String[], Class)
public static void setup(java.lang.String[] argv)
public void installPatches()
public com.webobjects.appserver.WOResourceManager createResourceManager()
createResourceManager
in class com.webobjects.appserver.WOApplication
public java.lang.String _newLocationForRequest(com.webobjects.appserver.WORequest aRequest)
_newLocationForRequest
in class com.webobjects.appserver.WOApplication
WOApplication._newLocationForRequest(com.webobjects.appserver.WORequest)
public java.lang.Boolean useEditingContextUnlocker()
public java.lang.Boolean traceOpenEditingContextLocks()
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.StatisticsLogRotationFrequency
public final void finishInitialization(com.webobjects.foundation.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(com.webobjects.foundation.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)
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()
killInstance
.
run
in class com.webobjects.appserver.WOApplication
public com.webobjects.appserver.WORequest createRequest(java.lang.String aMethod, java.lang.String aURL, java.lang.String anHTTPVersion, com.webobjects.foundation.NSDictionary someHeaders, com.webobjects.foundation.NSData aContent, com.webobjects.foundation.NSDictionary someInfo)
createRequest
in class com.webobjects.appserver.WOApplication
public com.webobjects.appserver.WORequest createRequest(java.lang.String method, java.lang.String aurl, java.lang.String anHTTPVersion, java.util.Map<java.lang.String,? extends java.util.List<java.lang.String>> someHeaders, com.webobjects.foundation.NSData content, java.util.Map<java.lang.String,java.lang.Object> someInfo)
protected com.webobjects.appserver.WORequest _createRequest(java.lang.String aMethod, java.lang.String aURL, java.lang.String anHTTPVersion, com.webobjects.foundation.NSDictionary someHeaders, com.webobjects.foundation.NSData aContent, com.webobjects.foundation.NSDictionary someInfo)
ERXRequest
object that fixes a bug with localization.
public static com.webobjects.appserver.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, com.webobjects.foundation.NSArray nsarray)
er.extensions.ERXApplication.fixCachingEnabled=false
is
you don't want it to load.
_componentDefinition
in class com.webobjects.appserver.WOApplication
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. 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 com.webobjects.appserver.WOApplication
public void refuseNewSessions(boolean value)
refuseNewSessions
in class com.webobjects.appserver.WOApplication
public void killInstance()
System.exit(1)
public java.lang.String nameSuffix()
null
public java.lang.String name()
nameSuffix
if one is set.
name
in class com.webobjects.appserver.WOApplication
public java.lang.String rawName()
WOApplication
's name
method.
public com.webobjects.foundation.NSMutableDictionary extraInformationForExceptionInContext(java.lang.Exception e, com.webobjects.appserver.WOContext context)
public com.webobjects.appserver.WOResponse reportException(java.lang.Throwable exception, com.webobjects.appserver.WOContext context, com.webobjects.foundation.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 com.webobjects.appserver.WOResponse handleActionRequestError(com.webobjects.appserver.WORequest aRequest, java.lang.Exception exception, java.lang.String reason, com.webobjects.appserver.WORequestHandler aHandler, java.lang.String actionClassName, java.lang.String actionName, java.lang.Class actionClass, com.webobjects.appserver.WOAction actionInstance)
handleActionRequestError
in class com.webobjects.appserver.WOApplication
WOApplication.handleActionRequestError(WORequest, Exception, String,
WORequestHandler, String, String, Class, WOAction)
public com.webobjects.appserver.WOResponse handleException(java.lang.Exception exception, com.webobjects.appserver.WOContext context)
handleException
in class com.webobjects.appserver.WOApplication
exception
- to be handledcontext
- current context
public com.webobjects.appserver.WOResponse genericHandleException(java.lang.Exception exception, com.webobjects.appserver.WOContext context)
exception
- to be handledcontext
- current context
public 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 com.webobjects.appserver.WOActionResults invokeAction(com.webobjects.appserver.WORequest request, com.webobjects.appserver.WOContext context)
invokeAction
in class ERXAjaxApplication
request
- objectcontext
- objectpublic void appendToResponse(com.webobjects.appserver.WOResponse response, com.webobjects.appserver.WOContext context)
appendToResponse
in class com.webobjects.appserver.WOApplication
response
- objectcontext
- objectpublic static void _startRequest()
public static void _endRequest()
public static boolean isInRequest()
public ERXDelayedRequestHandler delayedRequestHandler()
public com.webobjects.appserver.WOResponse dispatchRequest(com.webobjects.appserver.WORequest request)
dispatchRequest
in class com.webobjects.appserver.WOApplication
request
- object
public com.webobjects.appserver.WOResponse dispatchRequestImmediately(com.webobjects.appserver.WORequest request)
request
- public com.webobjects.appserver.WOContext createContextForRequest(com.webobjects.appserver.WORequest request)
createContextForRequest
in class com.webobjects.appserver.WOApplication
request
- the request
public com.webobjects.appserver.WOResponse createResponseInContext(com.webobjects.appserver.WOContext context)
createResponseInContext
in class com.webobjects.appserver.WOApplication
public void gracefulTerminate()
gracefulTerminate
in interface ERXGracefulShutdown.GracefulApplication
public 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.
public static boolean isWO54()
public static boolean isDevelopmentModeSafe()
protected static boolean _defaultIsDevelopmentMode()
public boolean isDevelopmentMode()
public com.webobjects.appserver.WOSession createSessionForRequest(com.webobjects.appserver.WORequest worequest)
createSessionForRequest
in class com.webobjects.appserver.WOApplication
public void saveSessionForContext(com.webobjects.appserver.WOContext wocontext)
saveSessionForContext
in class com.webobjects.appserver.WOApplication
public com.webobjects.appserver.WOSession restoreSessionWithID(java.lang.String sessionID, com.webobjects.appserver.WOContext wocontext)
restoreSessionWithID
in class com.webobjects.appserver.WOApplication
public 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 gzip
public com.webobjects.foundation.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 rewrite
public boolean rewriteDirectConnectURL()
public java.lang.String directConnectURL()
directConnectURL
in class com.webobjects.appserver.WOApplication
public void setDefaultEncoding(java.lang.String encoding)
encoding
- public <T extends com.webobjects.appserver.WOComponent> T pageWithName(java.lang.Class<T> componentClass, com.webobjects.appserver.WOContext context)
T
- the type of component tocomponentClass
- the component class to lookupcontext
- the context
public <T extends com.webobjects.appserver.WOComponent> T pageWithName(java.lang.Class<T> componentClass)
T
- the type of component tocomponentClass
- the component class to lookup
public com.webobjects.foundation.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(com.webobjects.foundation.NSMutableArray<com.webobjects.foundation.NSDictionary<java.lang.String,java.lang.Object>> additionalAdaptors)
additionalAdaptors
- the mutable adaptors arraypublic com.webobjects.foundation.NSArray<com.webobjects.foundation.NSDictionary<java.lang.String,java.lang.Object>> additionalAdaptors()
additionalAdaptors
in class com.webobjects.appserver.WOApplication
protected void _debugValueForDeclarationNamed(com.webobjects.appserver.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 com.webobjects.appserver.WOApplication
public 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 com.webobjects.appserver.WOApplication
public 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 name
public void clearDebugEnabledForAllComponents()
public static java.lang.String erAjaxRequestHandlerKey()
public void terminate()
terminate
in class com.webobjects.appserver.WOApplication
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |