Project Wonder 5.0

er.extensions.appserver
Class ERXMainRunner

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

public class ERXMainRunner
extends ERXApplication

ERXMainRunner makes it a little easier to run a main method that requires a full application context. You can setup an Eclipse run profile for the WOApplication "ERXMainRunner" with the command line parameter:

-mainClass MyMainClass

or

-mainClass MyMainClass -mainMethod main2

And it will run an application, call the main method you passed in, and then System.exit. Provide an empty mainClass string if you handle everything in your startup.

Author:
mschrag (inspired by Anjo :) )

Nested Class Summary
 
Nested classes/interfaces inherited from class er.extensions.appserver.ERXApplication
ERXApplication.JarChecker, ERXApplication.Loader
 
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
static java.lang.String[] _args
           
 
Fields inherited from class er.extensions.appserver.ERXApplication
_formatterFactory, _initializedAdaptors, _killTimer, _memoryLowThreshold, _memoryStarvedThreshold, _replaceApplicationPathPattern, _replaceApplicationPathReplace, _responseCompressionEnabled, _responseCompressionTypes, _sslHost, _sslPort, _streamingRequestHandlerKeys, _useSessionStoreDeadlockDetection, AllBundlesLoadedNotification, ApplicationDidCreateNotification, ApplicationDidFinishInitializationNotification, ApplicationWillTerminateNotification, AppShouldExitOnOutOfMemoryError, log, LowMemoryNotification, LowMemoryResolvedNotification, propertiesFromArgv, requestHandlingLog, startupLog, StarvedMemoryNotification, StarvedMemoryResolvedNotification, statsLog, useComponentActionRedirection
 
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
ERXMainRunner()
           
 
Method Summary
 void didFinishLaunching()
          Called when the application posts WOApplication.ApplicationDidFinishLaunchingNotification.
static void main(java.lang.String[] args)
           
 
Methods inherited from class er.extensions.appserver.ERXApplication
_addAdditionalAdaptors, _componentDefinition, _createRequest, _debugValueForDeclarationNamed, _defaultIsDevelopmentMode, _endRequest, _newLocationForRequest, _rewriteURL, _setSslHost, _setSslPort, _startRequest, additionalAdaptors, appendToResponse, checkMemory, checkMemory, clearDebugEnabledForAllComponents, configureStatisticsLogging, constants, createContextForRequest, createRequest, createRequest, createResourceManager, createResponseInContext, createSessionForRequest, debugEnabledForComponent, delayedRequestHandler, didFinishLaunching, directConnectURL, dispatchRequest, dispatchRequestImmediately, erAjaxRequestHandlerKey, erxApplication, extraInformationForExceptionInContext, finishInitialization, finishInitialization, formatterFactory, genericHandleException, gracefulTerminate, handleActionRequestError, handleException, handlePotentiallyFatalException, installPatches, instantiatePage, invokeAction, isDevelopmentMode, isDevelopmentModeSafe, isInRequest, isRefusingNewSessions, isStreamingRequestHandlerKey, isWO54, killInstance, logSetValueForDeclarationNamed, logTakeValueForDeclarationNamed, main, migrationsDidRun, migrationsWillRun, migrator, name, nameSuffix, pageWithName, pageWithName, rawName, refuseNewSessions, refuseSessionsOnStarvedMemory, registerStreamingRequestHandlerKey, reportException, responseCompressionEnabled, responseCompressionTypes, restoreSessionWithID, rewriteDirectConnectURL, run, saveSessionForContext, sessionTimeOutInMinutes, setDebugEnabledForComponent, setDefaultEncoding, setup, sslEnabled, sslHost, sslPort, startRefusingSessions, terminate, traceOpenEditingContextLocks, useComponentActionRedirection, useEditingContextUnlocker, useSessionStoreDeadlockDetection
 
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, 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

_args

public static java.lang.String[] _args
Constructor Detail

ERXMainRunner

public ERXMainRunner()
Method Detail

main

public static void main(java.lang.String[] args)

didFinishLaunching

public void didFinishLaunching()
Description copied from class: ERXApplication
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.

Overrides:
didFinishLaunching in class ERXApplication

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

Copyright © 2002 – 2007 Project Wonder.