Project Wonder 5.0

er.extensions.appserver
Class ERXApplication

java.lang.Object
  extended by com.webobjects.appserver.WOApplication
      extended by er.extensions.appserver.ajax.ERXAjaxApplication
          extended by er.extensions.appserver.ERXApplication
All Implemented Interfaces:
com.webobjects.foundation.NSKeyValueCoding, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCodingAdditions, ERXGracefulShutdown.GracefulApplication
Direct Known Subclasses:
ERXMainRunner

public abstract class ERXApplication
extends ERXAjaxApplication
implements ERXGracefulShutdown.GracefulApplication

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.
<T extends com.webobjects.appserver.WOComponent>
T
pageWithName(java.lang.Class<T> componentClass)
          Calls pageWithName with ERXWOContext.currentContext() for the current thread.
<T extends com.webobjects.appserver.WOComponent>
T
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

log

public static final org.apache.log4j.Logger log
logging support


requestHandlingLog

public static final org.apache.log4j.Logger requestHandlingLog
request logging support


statsLog

public static final org.apache.log4j.Logger statsLog
statistic logging support


startupLog

public static final org.apache.log4j.Logger startupLog
startup logging support


LowMemoryNotification

public static final 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. You should register your caching classes for this notification so you can release memory. Registration should happen at launch time.

See Also:
Constant Field Values

LowMemoryResolvedNotification

public static final java.lang.String LowMemoryResolvedNotification
Notification to get posted when we have recovered from a LowMemory condition.

See Also:
Constant Field Values

StarvedMemoryNotification

public static final java.lang.String StarvedMemoryNotification
Notification to get posted when we are on the brink of running out of memory. By default, sessions will begin to be refused when this happens as well.

See Also:
Constant Field Values

StarvedMemoryResolvedNotification

public static final java.lang.String StarvedMemoryResolvedNotification
Notification to get posted when we have recovered from a StarvedMemory condition.

See Also:
Constant Field Values

ApplicationWillTerminateNotification

public static final java.lang.String ApplicationWillTerminateNotification
Notification to get posted when terminate() is called.

See Also:
Constant Field Values

AppShouldExitOnOutOfMemoryError

public static final java.lang.String AppShouldExitOnOutOfMemoryError
Property to control whether to exit on an OutOfMemoryError.

See Also:
Constant Field Values

AllBundlesLoadedNotification

public static final java.lang.String AllBundlesLoadedNotification
Notification to post when all bundles were loaded but before their principal was called

See Also:
Constant Field Values

ApplicationDidCreateNotification

public static final java.lang.String ApplicationDidCreateNotification
Notification to post when all bundles were loaded but before their principal was called

See Also:
Constant Field Values

ApplicationDidFinishInitializationNotification

public static final java.lang.String ApplicationDidFinishInitializationNotification
Notification to post when all application initialization processes are complete (including migrations)

See Also:
Constant Field Values

propertiesFromArgv

protected static com.webobjects.foundation.NSDictionary propertiesFromArgv

_memoryStarvedThreshold

protected java.math.BigDecimal _memoryStarvedThreshold
Holds the value of the property er.extensions.ERXApplication.memoryStarvedThreshold


_memoryLowThreshold

protected java.math.BigDecimal _memoryLowThreshold
Holds the value of the property er.extensions.ERXApplication.memoryLowThreshold


_replaceApplicationPathPattern

protected java.lang.String _replaceApplicationPathPattern
The path rewriting pattern to match (@see _rewriteURL)


_replaceApplicationPathReplace

protected java.lang.String _replaceApplicationPathReplace
The path rewriting replacement to apply to the matched pattern (@see _rewriteURL)


_sslHost

protected java.lang.String _sslHost
The SSL host used by this application.


_sslPort

protected java.lang.Integer _sslPort
The SSL port used by this application.


_initializedAdaptors

protected boolean _initializedAdaptors
Tracks whether or not _addAdditionalAdaptors has been called yet.


_killTimer

protected com.webobjects.appserver.WOTimer _killTimer

useComponentActionRedirection

protected java.lang.Boolean useComponentActionRedirection
use the redirect feature


_streamingRequestHandlerKeys

protected com.webobjects.foundation.NSMutableArray<java.lang.String> _streamingRequestHandlerKeys
improved streaming support


_useSessionStoreDeadlockDetection

protected java.lang.Boolean _useSessionStoreDeadlockDetection
use the redirect feature


_formatterFactory

protected static final ERXFormatterFactory _formatterFactory

_responseCompressionEnabled

protected java.lang.Boolean _responseCompressionEnabled

_responseCompressionTypes

protected com.webobjects.foundation.NSSet<java.lang.String> _responseCompressionTypes
Constructor Detail

ERXApplication

public ERXApplication()
The ERXApplication contructor.

Method Detail

main

public 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.

See Also:
WOApplication.main(String[], Class)

setup

public static void setup(java.lang.String[] argv)
Called prior to actually initializing the app. Defines framework load order, class path order, checks patches etc.


installPatches

public void installPatches()
Installs several bufixes and enhancements to WODynamicElements. Sets the Context class name to "er.extensions.ERXWOContext" if it is "WOContext". Patches ERXWOForm, ERXWOFileUpload, ERXWOText to be used instead of WOForm, WOFileUpload, WOText.


createResourceManager

public com.webobjects.appserver.WOResourceManager createResourceManager()
Overrides:
createResourceManager in class com.webobjects.appserver.WOApplication

_newLocationForRequest

public 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. If mod_rewrite is being used we don't want the adaptor prefix being part of the redirect.

Overrides:
_newLocationForRequest in class com.webobjects.appserver.WOApplication
See Also:
WOApplication._newLocationForRequest(com.webobjects.appserver.WORequest)

useEditingContextUnlocker

public java.lang.Boolean useEditingContextUnlocker()
Deprecated. use er.extensions.ERXEC.useUnlocker property instead

Decides whether to use editing context unlocking.

Returns:
true if ECs should be unlocked after each RR-loop

traceOpenEditingContextLocks

public java.lang.Boolean traceOpenEditingContextLocks()
Deprecated. use er.extensions.ERXEC.traceOpenLocks property instead

Decides whether or not to keep track of open editing context locks.

Returns:
true if editing context locks should be tracked

configureStatisticsLogging

public void configureStatisticsLogging()
Configures the statistics logging for a given application. By default will log to a file /--.log if the base log path is defined. The base log path is defined by the property 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


finishInitialization

public final void finishInitialization(com.webobjects.foundation.NSNotification n)
Notification method called when the application posts the notification WOApplication.ApplicationWillFinishLaunchingNotification. This method calls subclasses' finishInitialization(com.webobjects.foundation.NSNotification) method.

Parameters:
n - notification that is posted after the WOApplication has been constructed, but before the application is ready for accepting requests.

migrationsWillRun

protected void migrationsWillRun(ERXMigrator migrator)
Called prior to migrations running.

Parameters:
migrator - the migrator that will be used

migrationsDidRun

protected void migrationsDidRun(ERXMigrator migrator)
Called after migrations finish running.

Parameters:
migrator - the migrator that was used

didFinishLaunching

public final void didFinishLaunching(com.webobjects.foundation.NSNotification n)
Notification method called when the application posts the notification WOApplication.ApplicationDidFinishLaunchingNotification. This method calls subclasse's didFinishLaunching(com.webobjects.foundation.NSNotification) method.

Parameters:
n - notification that is posted after the WOApplication has finished launching and is ready for accepting requests.

finishInitialization

public void finishInitialization()
Called when the application posts WOApplication.ApplicationWillFinishLaunchingNotification. Override this to perform application initialization. (optional)


didFinishLaunching

public void didFinishLaunching()
Called when the application posts 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.


erxApplication

public static ERXApplication erxApplication()
The ERXApplication singleton.

Returns:
returns the WOApplication.application() cast as an ERXApplication

run

public void run()
Adds support for automatic application cycling. Applications can be configured to cycle in two ways:

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.

Overrides:
run in class com.webobjects.appserver.WOApplication

createRequest

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)
Creates the request object for this loop. Calls _createRequest(). For WO 5.3.

Overrides:
createRequest in class com.webobjects.appserver.WOApplication

createRequest

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)
Creates the request object for this loop. Calls _createRequest(). For WO 5.4.


_createRequest

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.


instantiatePage

public 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

Parameters:
pageName - - The name of the WOComponent that must be instantiated.
Returns:
created WOComponent with the given name

startRefusingSessions

public void startRefusingSessions()
Stops the application from handling any new requests. Will still handle requests from existing sessions.


_componentDefinition

public com.webobjects.appserver._private.WOComponentDefinition _componentDefinition(java.lang.String s,
                                                                                    com.webobjects.foundation.NSArray nsarray)
Bugfix for WO component loading. It fixes: You need to set er.extensions.ERXApplication.fixCachingEnabled=false is you don't want it to load.

Overrides:
_componentDefinition in class com.webobjects.appserver.WOApplication
Author:
ak

checkMemory

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).

Author:
ak

checkMemory

protected boolean checkMemory(java.math.BigDecimal memoryThreshold,
                              boolean attemptGC)

refuseSessionsOnStarvedMemory

protected boolean refuseSessionsOnStarvedMemory()
Override and return false if you do not want sessions to be refused when memory is starved.

Returns:
whether or not sessions should be refused on starved memory

isRefusingNewSessions

public boolean isRefusingNewSessions()
Overridden to return the super value OR true if the app is memory starved.

Overrides:
isRefusingNewSessions in class com.webobjects.appserver.WOApplication

refuseNewSessions

public void refuseNewSessions(boolean value)
Overridden to fix that direct connect apps can't refuse new sessions.

Overrides:
refuseNewSessions in class com.webobjects.appserver.WOApplication

killInstance

public void killInstance()
Killing the instance will log a 'Forcing exit' message and then call System.exit(1)


nameSuffix

public java.lang.String nameSuffix()
The name suffix is appended to the current name of the application. This adds the ability to add a useful suffix to differentiate between different sets of applications on the same machine.

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.

Returns:
the System property ERApplicationNameSuffix or null

name

public java.lang.String name()
Adds the ability to completely change the applications name by setting the System property ERApplicationName. Will also append the nameSuffix if one is set.

Overrides:
name in class com.webobjects.appserver.WOApplication
Returns:
the computed name of the application.

rawName

public java.lang.String rawName()
This method returns WOApplication's name method.

Returns:
the name of the application executable.

extraInformationForExceptionInContext

public 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. Potentially added information:
  1. the current page name
  2. the current component
  3. the complete hierarchy of nested components
  4. the requested uri
  5. the D2W page configuration
  6. the previous page list (from the WOStatisticsStore)
Also, in case the top-level exception was a EOGeneralAdaptorException, then you also get the failed ops and the sql exception.

Returns:
dictionary containing extra information for the current context.

reportException

public com.webobjects.appserver.WOResponse reportException(java.lang.Throwable exception,
                                                           com.webobjects.appserver.WOContext context,
                                                           com.webobjects.foundation.NSDictionary extraInfo)
Reports an exception. This method only logs the error and could be overriden to return a valid error page.

Parameters:
exception - to be reported
context - for the exception
extraInfo - dictionary of extra information about what was happening when the exception was thrown.
Returns:
a valid response to display or null. In that case the superclasses handleException(Exception, WOContext) is called

handleActionRequestError

public 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. As the super-implementation is empty, it is fairly safe to override here to call the normal exception handling earlier than usual.

Overrides:
handleActionRequestError in class com.webobjects.appserver.WOApplication
See Also:
WOApplication.handleActionRequestError(WORequest, Exception, String, WORequestHandler, String, String, Class, WOAction)

handleException

public com.webobjects.appserver.WOResponse handleException(java.lang.Exception exception,
                                                           com.webobjects.appserver.WOContext context)
Logs extra information about the current state.

Overrides:
handleException in class com.webobjects.appserver.WOApplication
Parameters:
exception - to be handled
context - current context
Returns:
the WOResponse of the generated exception page.

genericHandleException

public com.webobjects.appserver.WOResponse genericHandleException(java.lang.Exception exception,
                                                                  com.webobjects.appserver.WOContext context)
Standard exception page. Also logs error to standard out.

Parameters:
exception - to be handled
context - current context
Returns:
the WOResponse of the generic exception page.

handlePotentiallyFatalException

public void handlePotentiallyFatalException(java.lang.Exception exception)
Handles the potentially fatal OutOfMemoryError by quitting the application ASAP. Broken out into a separate method to make custom error handling easier, ie. generating your own error pages in production, etc.

Parameters:
exception - to check if it is a fatal exception.

useComponentActionRedirection

public boolean useComponentActionRedirection()
Set the er.extensions.ERXComponentActionRedirector.enabled=true property to actually the redirect feature.

Returns:
flag if to use the redirect feature

invokeAction

public com.webobjects.appserver.WOActionResults invokeAction(com.webobjects.appserver.WORequest request,
                                                             com.webobjects.appserver.WOContext context)
Overridden to allow for redirected responses.

Overrides:
invokeAction in class ERXAjaxApplication
Parameters:
request - object
context - object

appendToResponse

public void appendToResponse(com.webobjects.appserver.WOResponse response,
                             com.webobjects.appserver.WOContext context)
Overridden to allow for redirected responses.

Overrides:
appendToResponse in class com.webobjects.appserver.WOApplication
Parameters:
response - object
context - object

_startRequest

public static void _startRequest()
Initializes the current thread for a request.


_endRequest

public static void _endRequest()
Cleans up the current thread after a request is complete.


isInRequest

public static boolean isInRequest()
Returns true if the current thread is dispatching a request.

Returns:
true if the current thread is dispatching a request

delayedRequestHandler

public ERXDelayedRequestHandler delayedRequestHandler()
Returns the delayedRequestHandler, if any is registered.


dispatchRequest

public com.webobjects.appserver.WOResponse dispatchRequest(com.webobjects.appserver.WORequest request)
Overridden to allow for redirected responses and null the thread local storage.

Overrides:
dispatchRequest in class com.webobjects.appserver.WOApplication
Parameters:
request - object
Returns:
response

dispatchRequestImmediately

public com.webobjects.appserver.WOResponse dispatchRequestImmediately(com.webobjects.appserver.WORequest request)
Dispatches the request without checking for the delayedRequestHandler()

Parameters:
request -

createContextForRequest

public com.webobjects.appserver.WOContext createContextForRequest(com.webobjects.appserver.WORequest request)
When a context is created we push it into thread local storage. This handles the case for direct actions.

Overrides:
createContextForRequest in class com.webobjects.appserver.WOApplication
Parameters:
request - the request
Returns:
the newly created context

createResponseInContext

public com.webobjects.appserver.WOResponse createResponseInContext(com.webobjects.appserver.WOContext context)
Overrides:
createResponseInContext in class com.webobjects.appserver.WOApplication

gracefulTerminate

public void gracefulTerminate()
Override to perform any last minute cleanup before the application terminates. See for where this is called if signal handling is enabled. Default implementation calls terminate.

Specified by:
gracefulTerminate in interface ERXGracefulShutdown.GracefulApplication

registerStreamingRequestHandlerKey

public void registerStreamingRequestHandlerKey(java.lang.String s)

isStreamingRequestHandlerKey

public boolean isStreamingRequestHandlerKey(java.lang.String s)

useSessionStoreDeadlockDetection

public boolean useSessionStoreDeadlockDetection()
Deadlock in session-store detection. Note that the detection only work in single-threaded mode, and is mostly useful to find cases when a session is checked out twice in a single RR-loop, which will lead to a session store lockup. Set the er.extensions.ERXApplication.useSessionStoreDeadlockDetection=true property to actually the this feature.

Returns:
flag if to use the this feature

isWO54

public static boolean isWO54()
Returns true if this app is running in WO 5.4.

Returns:
true if this app is running in WO 5.4

isDevelopmentModeSafe

public static boolean isDevelopmentModeSafe()
Returns whether or not this application is in development mode. This one is named "Safe" because it does not require you to be running an ERXApplication (and because you can't have a static and not-static method of the same name. bah). If you are using ERXApplication, this will call isDevelopmentMode on your application. If not, it will call ERXApplication_defaultIsDevelopmentMode() which checks for the system properties "er.extensions.ERXApplication.developmentMode" and/or "WOIDE".

Returns:
whether or not the current application is in development mode

_defaultIsDevelopmentMode

protected static boolean _defaultIsDevelopmentMode()
Returns whether or not this application is running in development-mode. If you are using Xcode, you should add a WOIDE=Xcode setting to your launch parameters.


isDevelopmentMode

public boolean isDevelopmentMode()
Returns whether or not this application is running in development-mode. If you are using Xcode, you should add a WOIDE=Xcode setting to your launch parameters.


createSessionForRequest

public com.webobjects.appserver.WOSession createSessionForRequest(com.webobjects.appserver.WORequest worequest)
Overridden to check the sessions

Overrides:
createSessionForRequest in class com.webobjects.appserver.WOApplication

saveSessionForContext

public void saveSessionForContext(com.webobjects.appserver.WOContext wocontext)
Overridden to check the sessions

Overrides:
saveSessionForContext in class com.webobjects.appserver.WOApplication

restoreSessionWithID

public com.webobjects.appserver.WOSession restoreSessionWithID(java.lang.String sessionID,
                                                               com.webobjects.appserver.WOContext wocontext)
Overridden to check the sessions

Overrides:
restoreSessionWithID in class com.webobjects.appserver.WOApplication

sessionTimeOutInMinutes

public java.lang.Number sessionTimeOutInMinutes()

formatterFactory

public ERXFormatterFactory formatterFactory()
Getting formatters into KVC: bind to application.formatterFactory.(60/#,##0.00)


responseCompressionEnabled

public boolean responseCompressionEnabled()
checks the value of er.extensions.ERXApplication.responseCompressionEnabled and if true turns on response compression by gzip


responseCompressionTypes

public 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. The default is ("application/x-javascript")

Returns:
an array of mime type strings

migrator

public ERXMigrator migrator()
Returns an ERXMigrator with the lock owner name "appname-instancenumber".


_rewriteURL

public java.lang.String _rewriteURL(java.lang.String url)
This method is called by ERXWOContext and provides the application a hook to rewrite generated URLs. You can also set "er.extensions.replaceApplicationPath.pattern" to the pattern to match and "er.extensions.replaceApplicationPath.replace" to the value to replace it with. For example, in Properties: 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]

Parameters:
url - the URL to rewrite
Returns:
the rewritten URL

rewriteDirectConnectURL

public boolean rewriteDirectConnectURL()
Returns whether or not to rewrite direct connect URLs.

Returns:
whether or not to rewrite direct connect URLs

directConnectURL

public java.lang.String directConnectURL()
Returns the directConnecURL, optionally rewritten.

Overrides:
directConnectURL in class com.webobjects.appserver.WOApplication

setDefaultEncoding

public void setDefaultEncoding(java.lang.String encoding)
Set the default encoding of the app (message encodings)

Parameters:
encoding -

pageWithName

public <T extends com.webobjects.appserver.WOComponent> T pageWithName(java.lang.Class<T> componentClass,
                                                                       com.webobjects.appserver.WOContext context)
Returns the component for the given class without having to cast. For example: MyPage page = ERXApplication.erxApplication().pageWithName(MyPage.class, context);

Type Parameters:
T - the type of component to
Parameters:
componentClass - the component class to lookup
context - the context
Returns:
the created component

pageWithName

public <T extends com.webobjects.appserver.WOComponent> T pageWithName(java.lang.Class<T> componentClass)
Calls pageWithName with ERXWOContext.currentContext() for the current thread.

Type Parameters:
T - the type of component to
Parameters:
componentClass - the component class to lookup
Returns:
the created component

constants

public com.webobjects.foundation.NSKeyValueCodingAdditions constants()
Makes ERXConstants available for binding in the UI. Bind to application.constants.MyConstantClass.


sslEnabled

public boolean sslEnabled()
Returns whether or not DirectConnect SSL should be enabled. If you set this, please review the DirectConnect SSL section of the ERExtensions sample Properties file to learn more about how to properly configure it.

Returns:
whether or not DirectConnect SSL should be enabled
Properties
er.extensions.ERXApplication.ssl.enableder.extensions.ERXApplication.ssl.enabled
           

sslHost

public java.lang.String sslHost()
Returns the host name that will be used to bind the SSL socket to (defaults to host()).

Returns:
the SSL socket host
Properties
er.extensions.ERXApplication.ssl.hoster.extensions.ERXApplication.ssl.host
           

_setSslHost

public void _setSslHost(java.lang.String sslHost)
Sets an SSL host override.

Parameters:
sslHost - an SSL host override

sslPort

public int sslPort()
Returns the SSL port that will be used for DirectConnect SSL (defaults to 443). A value of 0 will cause WO to autogenerate an SSL port number.

Returns:
the SSL port that will be used for DirectConnect SSL
Properties
er.extensions.ERXApplication.ssl.porter.extensions.ERXApplication.ssl.port
           

_setSslPort

public void _setSslPort(int sslPort)
Sets an SSL port override (called back by the ERXSecureAdaptor)

Parameters:
sslPort - an ssl port override

_addAdditionalAdaptors

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. Subclasses can extend this method, but should call super._addAdditionalAdaptors.

Parameters:
additionalAdaptors - the mutable adaptors array

additionalAdaptors

public 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.

Overrides:
additionalAdaptors in class com.webobjects.appserver.WOApplication

_debugValueForDeclarationNamed

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)

logTakeValueForDeclarationNamed

public 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.

Overrides:
logTakeValueForDeclarationNamed in class com.webobjects.appserver.WOApplication

logSetValueForDeclarationNamed

public 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.

Overrides:
logSetValueForDeclarationNamed in class com.webobjects.appserver.WOApplication

setDebugEnabledForComponent

public void setDebugEnabledForComponent(boolean debugEnabled,
                                        java.lang.String componentName)
Turns on/off binding debugging for the given component. Binding debugging requires using the WOOgnl template parser and setting ognl.debugSupport=true.

Parameters:
debugEnabled - whether or not to enable debugging
componentName - the component name to enable debugging for

debugEnabledForComponent

public boolean debugEnabledForComponent(java.lang.String componentName)
Returns whether or not binding debugging is enabled for the given component

Parameters:
componentName - the component name
Returns:
whether or not binding debugging is enabled for the given componen

clearDebugEnabledForAllComponents

public void clearDebugEnabledForAllComponents()
Turns off binding debugging for all components.


erAjaxRequestHandlerKey

public static java.lang.String erAjaxRequestHandlerKey()
Workaround for method missing in 5.3. Misnamed because static methods can't override client methods.

Returns:
the request handler key for ajax.

terminate

public void terminate()
Sends out a ApplicationWillTerminateNotification before actually starting to terminate.

Overrides:
terminate in class com.webobjects.appserver.WOApplication

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.