public class ServiceManager extends Object
Modifier and Type | Field and Description |
---|---|
static String |
UPGRADE_FILENAME |
Constructor and Description |
---|
ServiceManager() |
Modifier and Type | Method and Description |
---|---|
static Service |
addService(String id,
Service s)
Add an object to the list of services.
|
static Service |
addService(String classname,
String id)
Add a class to the services, the class is loaded, the default contructor
is called and the startup() method is called.
|
static void |
closeServerSocketLocker() |
static Locale |
getConfiguredLocale() |
static String |
getJVMName()
Get the name of the JVM incarnation of @enterprise.
|
static Service |
getService(String id)
Return the service by id.
|
static Date |
getStartDate()
Return the date of startup.
|
static boolean |
isShutdownInProgress()
This method returns true if the shutdown in in progress.
|
static boolean |
isStandalone()
Returns true if @enterprise is running standalone (not in an application server).
|
static boolean |
isUpgrading()
Returns true if @enterprise is running in upgrade mode.
|
static void |
main()
Start @enterprise without a configuration file ( in app-server; conffile has already been set via webapplistener)
|
static void |
main(String[] args)
Main method suitable for starting @enterprise.
|
static void |
main(String conffile,
boolean logOnConsole,
boolean isStandalone)
Start @enterprise with a configuration file.
|
static void |
setDefaultLocale()
Set the default locale and time zone for the whole java process.
|
static void |
shutdown()
Shutdown the services, the shutdown() methods of the services are called.
|
static void |
shutdown(int status)
This method is called from HTMLAdmin
|
static void |
shutdown(int status,
int delayMS) |
static void |
shutdownService(String[] args)
This method is called as stop method when running as JavaService NT service
|
public static final String UPGRADE_FILENAME
public static String getJVMName()
public static void main(String[] args) throws Exception
args
- the first argument should contain the path of the configuration file.
additional optional arguments are: -restricted
:starts @enterprise in restricted mode
(no non-sysadm logins allowed) and -upgrade
: performs @enterprise and applications upgrades. In this
mode, @enterprise stops after performing this upgrades.Exception
public static void main() throws Exception
Exception
public static void main(String conffile, boolean logOnConsole, boolean isStandalone) throws Exception
conffile
- path to the configurationlogOnConsole
- true if logging should go to the console.Exception
public static void closeServerSocketLocker()
public static void setDefaultLocale()
public static Locale getConfiguredLocale()
public static Service addService(String id, Service s)
id
- the id for the service tables
- the service objectpublic static Service addService(String classname, String id)
classname
- the name of the service classid
- the id for the service tablepublic static void shutdownService(String[] args)
public static void shutdown(int status)
status
- 0='Stop server', 2='Restart server'public static void shutdown(int status, int delayMS)
public static void shutdown()
public static Service getService(String id)
id
- the id of a service.public static Date getStartDate()
public static boolean isStandalone()
public static boolean isUpgrading()
public static boolean isShutdownInProgress()
@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.