Project Wonder 5.0.0.8794

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:
WOApplicationMBean, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, 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
WOApplication._EventLoggingEnabler, WOApplication.Event, WOApplication.TimeoutTask
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Field Summary
static String[] _args
           
 
Fields inherited from class er.extensions.appserver.ERXApplication
_formatterFactory, _initializedAdaptors, _killTimer, _memoryLowThreshold, _memoryStarvedThreshold, _replaceApplicationPathPattern, _replaceApplicationPathReplace, _responseCompressionEnabled, _sslHost, _sslPort, _streamingRequestHandlerKeys, _useSessionStoreDeadlockDetection, AllBundlesLoadedNotification, ApplicationDidCreateNotification, log, LowMemoryNotification, LowMemoryResolvedNotification, requestHandlingLog, StarvedMemoryNotification, StarvedMemoryResolvedNotification, statsLog, useComponentActionRedirection
 
Fields inherited from class er.extensions.appserver.ajax.ERXAjaxApplication
KEY_AJAX_SUBMIT_BUTTON, KEY_PARTIAL_FORM_SENDER_ID, KEY_UPDATE_CONTAINER_ID
 
Fields inherited from class com.webobjects.appserver.WOApplication
_adminRequestHandlerKey, _cgiAdaptorURLParsed, _classPathURLs, _launchServices, _terminating, _TheLastApplicationAccessTime, _unsetHost, _wasMainInvoked, ApplicationDidDispatchRequestNotification, ApplicationDidFinishLaunchingNotification, ApplicationWillDispatchRequestNotification, ApplicationWillFinishLaunchingNotification, CGIAdaptorURLProperty, DirectoryAliasProperty, DocumentRootProperty
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
 
Constructor Summary
ERXMainRunner()
           
 
Method Summary
 void didFinishLaunching()
          Called when the application posts WOApplication.ApplicationDidFinishLaunchingNotification.
static void main(String[] args)
           
 
Methods inherited from class er.extensions.appserver.ERXApplication
_addAdditionalAdaptors, _componentDefinition, _createRequest, _debugValueForDeclarationNamed, _defaultIsDevelopmentMode, _endRequest, _rewriteURL, _setSslHost, _setSslPort, _startRequest, additionalAdaptors, appendToResponse, checkMemory, checkMemory, clearDebugEnabledForAllComponents, configureStatisticsLogging, constants, createContextForRequest, createRequest, createRequest, createResourceManager, createResponseInContext, createSessionForRequest, debugEnabledForComponent, delayedRequestHandler, didFinishLaunching, directConnectURL, dispatchRequest, dispatchRequestImmediately, erxApplication, extraInformationForExceptionInContext, finishInitialization, finishInitialization, formatterFactory, genericHandleException, gracefulTerminate, handleActionRequestError, handleException, handlePotentiallyFatalException, installPatches, instantiatePage, invokeAction, isDevelopmentMode, isDevelopmentModeSafe, isInRequest, isRefusingNewSessions, isStreamingRequestHandlerKey, isWO54, killInstance, logSetValueForDeclarationNamed, logTakeValueForDeclarationNamed, main, migrator, name, nameSuffix, pageWithName, pageWithName, rawName, refuseNewSessions, refuseSessionsOnStarvedMemory, registerStreamingRequestHandlerKey, reportException, responseCompressionEnabled, restoreSessionWithID, rewriteDirectConnectURL, run, saveSessionForContext, sessionTimeOutInMinutes, setDebugEnabledForComponent, setDefaultEncoding, setup, sslEnabled, sslHost, sslPort, startRefusingSessions, traceOpenEditingContextLocks, useComponentActionRedirection, useEditingContextUnlocker, useSessionStoreDeadlockDetection
 
Methods inherited from class er.extensions.appserver.ajax.ERXAjaxApplication
ajaxSubmitButtonName, cleanUpHeaders, forceStorePage, isAjaxRequest, isAjaxSubmit, partialFormSenderID, setForceStorePage, setResponseDelegate, shouldNotStorePage, shouldNotStorePage
 
Methods inherited from class com.webobjects.appserver.WOApplication
_addToExpectedLanguages, _allowsCacheControlHeader, _checksForSpecialHeaders, _componentDefinitionFromClassNamed, _debugString, _discountTerminatedSession, _expectedLanguages, _finishInitializingSession, _initializeSessionInContext, _isDebuggingEnabled, _isDomesticSupportedDevelopmentPlatform, _isForeignSupportedDevelopmentPlatform, _isPageRecreationEnabled, _isSupportedDevelopmentPlatform, _lockDefaultEditingContext, _newLocationForRequest, _openInitialURL, _parseCGIAdaptorURL, _quitTimer, _rapidTurnaroundActiveForAnyProject, _removeComponentDefinitionCacheContents, _runLoop, _sessionClass, _setAllowsCacheControlHeader, _setChecksForSpecialHeaders, _setHost, _setHostAddress, _setLifebeatDestinationPort, _setLockDefaultEditingContext, _terminateFromMonitor, _terminateOrResetTimer, activeSessionsCount, adaptor, adaptorExtensions, adaptorName, adaptorPath, adaptors, adaptorsDispatchRequestsConcurrently, adaptorWithName, ajaxRequestHandlerKey, allowsConcurrentRequestHandling, application, applicationBaseURL, applicationExtension, associationFactory, autoOpenClientApplication, autoOpenInBrowser, awake, baseURL, canAccessFieldsDirectly, cgiAdaptorURL, combinedComponentPathURL, componentRequestHandlerKey, contextClassName, createDefaultNamespaceProvider, debugString, defaultAdaptor, defaultRequestHandler, defaultRequestHandlerClassName, defaultUndoStackLimit, directActionRequestHandlerKey, documentRoot, dynamicElementWithName, frameworksBaseURL, getAdaptorsDispatchRequestsConcurrently, getAdditionalAdaptors, getAgentID, getAllowsConcurrentRequestHandling, getApplicationBaseURL, getApplicationExtension, getAutoOpenClientApplication, getBaseURL, getCGIAdaptorURL, getClassPaths, getComponentRequestHandlerKey, getDefaultAdaptor, getDefaultUndoStackLimit, getDirectConnectURL, getFrameworkVersions, getHost, getHostAddress, getIncludeCommentsInResponses, getIsCachingEnabled, getIsMonitorEnabled, getIsPageRefreshOnBacktrackEnabled, getIsRefusingNewSessions, getIsTerminating, getJMXDomain, getLifebeatDestinationPort, getLifebeatInterval, getListenQueueSize, getMaxSocketIdleTime, getMBeanServer, getMinimumActiveSessionsCount, getName, getOutputPath, getPageCacheSize, getPageFragmentCacheSize, getPort, getServletConnectURL, getSessionTimeOut, getTimeOut, getWebObjectsVersion, getWebserverConnectURL, getWorkerThreadCountMax, getWorkerThreadCountMin, handleMalformedCookieString, handlePageRestorationErrorInContext, handleQueryWithUnboundKey, handlerForRequest, handleSessionCreationErrorInContext, handleSessionRestorationErrorInContext, handleTakeValueForUnboundKey, host, hostAddress, includeCommentsInResponses, instanceIdKey, isCachingEnabled, isConcurrentRequestHandlingEnabled, isDebuggingEnabled, isDirectConnectEnabled, isMonitorEnabled, isPageRefreshOnBacktrackEnabled, isTerminating, launchArguments, licensedRequestLimit, licensedRequestWindow, licensingAllowsMultipleInstances, licensingAllowsMultipleThreads, lifebeatDestinationPort, lifebeatEnabled, lifebeatInterval, listenQueueSize, loadFrameworks, lock, logString, maxSocketIdleTime, minimumActiveSessionsCount, monitorEnabled, monitorHost, monitoringEnabled, namespaceProvider, newDynamicURL, newDynamicURL, number, outputPath, pageCacheSize, pageFragmentCacheSize, pageWithName, path, permanentPageCacheSize, port, primeApplication, primeApplication, printsHTMLParserDiagnostics, projectSearchPath, recordingPath, registeredRequestHandlerKeys, registerMBean, registerMBean, registerRequestHandler, removeRequestHandlerForKey, requestHandlerForKey, requestHandlingLock, resourceManager, resourceRequestHandlerKey, responseForComponentWithName, responseForDirectActionWithNameAndClass, servletConnectURL, sessionIdKey, sessionStore, sessionStoreClassName, sessionTimeOut, setAdaptor, setAdditionalAdaptors, setAllowsConcurrentRequestHandling, setApplicationBaseURL, setAssociationFactory, setAutoOpenClientApplication, setAutoOpenInBrowser, setCachingEnabled, setCGIAdaptorURL, setComponentRequestHandlerKey, setContextClassName, setDefaultRequestHandler, setDefaultUndoStackLimit, setDirectActionRequestHandlerKey, setDirectConnectEnabled, setFrameworksBaseURL, setIncludeCommentsInResponses, setJMXDomain, setListenQueueSize, setLoadFrameworks, setMaxSocketIdleTime, setMinimumActiveSessionsCount, setMonitorEnabled, setMonitorHost, setNamespaceProvider, setPageCacheSize, setPageFragmentCacheSize, setPageRefreshOnBacktrackEnabled, setPermanentPageCacheSize, setPort, setPrintsHTMLParserDiagnostics, setProjectSearchPath, setRecordingPath, setResourceManager, setResourceRequestHandlerKey, setSessionStore, setSessionStoreClassName, setSessionTimeOut, setSMTPHost, setSocketCacheSize, setSocketMonitorSleepTime, setStatisticsStore, setTimeOut, setWebServiceRequestHandlerKey, setWorkerThreadCount, setWorkerThreadCountMax, setWorkerThreadCountMin, sharedEditingContext, shouldRestoreSessionOnCleanEntry, sleep, SMTPHost, socketCacheSize, socketMonitorSleepTime, statistics, statisticsStore, streamActionRequestHandlerKey, takeValueForKey, takeValueForKeyPath, takeValuesFromRequest, terminate, terminateAfterTimeInterval, timeOut, toString, unableToSetNullForKey, unlock, unregisterMBean, 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 String[] _args
Constructor Detail

ERXMainRunner

public ERXMainRunner()
Method Detail

main

public static void main(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: Thu, Jan 8, 2009 • 12:32 PM EST

Copyright © 2002 – 2007 Project Wonder.