public abstract class ServerApplication extends AbstractApplication implements SessionPoolProvider, SessionManagerProvider
| Constructor and Description |
|---|
ServerApplication(String name,
Class<? extends RemoteDbConnectionImpl> connectionClass)
Creates an instance of an application server.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
configurePreferences() |
protected DbServer |
createDbServer(Class<? extends RemoteDbConnectionImpl> connectionClass)
Creates the DbServer instance (but does not start it).
The default implementation creates a DbServer. |
SessionManager |
createSessionManager()
Creates the connection manager for the client sessions.
|
SessionPool |
createSessionPool()
Creates the logical SessionPool.
|
protected void |
doFinishStartup()
Finishes the startup.
The default implementation starts the modification thread, unless "--nomodthread" given, creates the connection manager, the Db pool,
and the DbServer instance. |
protected void |
doLogin()
Connects the server to the database backend.
|
protected void |
doStartDbServer()
Starts the RMI-server.
|
protected void |
doStop(int exitValue)
Terminates the application server.
|
protected void |
doStop(int exitValue,
Exception ex)
Terminates the application server.
|
CommandLine |
getCommandLine()
Gets the command line.
|
DbServer |
getDbServer()
Gets the RMI server.
|
static ServerApplication |
getServerApplication()
Gets the running server application.
|
SessionManager |
getSessionManager()
Gets the connection manager.
|
SessionPool |
getSessionPool() |
boolean |
isServer() |
void |
setSessionInfo(SessionInfo sessionInfo) |
void |
start()
Starts the application server without further arguments.
|
void |
start(String[] args)
Starts the application server.
|
void |
stop()
Gracefully terminates the application server.
|
configurePdoTracker, configureSecurityManager, createDomainContext, createSession, createSessionInfo, detectContainer, detectJNLP, doConfigureApplication, doInitialize, getCreationTime, getDomainContext, getName, getProperties, getProperty, getRunningApplication, getSession, getSessionInfo, getUser, getUser, isDeployedByJNLP, isRunningInContainer, logStackdump, register, setDomainContext, setName, setProperties, toString, unregister, updateSessionInfoAfterLoginclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waiton, opnpublic ServerApplication(String name, Class<? extends RemoteDbConnectionImpl> connectionClass)
name - the application nameconnectionClass - the class of the connection object to instantiate, null = default or from serverInfo's properties filepublic static ServerApplication getServerApplication()
public CommandLine getCommandLine()
public DbServer getDbServer()
public boolean isServer()
isServer in class AbstractApplicationpublic void start(String[] args)
args - the arguments (usually from commandline)public void start()
public void stop()
protected void configurePreferences()
configurePreferences in class AbstractApplicationprotected DbServer createDbServer(Class<? extends RemoteDbConnectionImpl> connectionClass) throws ApplicationException
DbServer.connectionClass - the class of the connection object to instantiate,
null = default or from serverInfo's properties fileApplicationException - if creating the DbServer failedpublic SessionManager createSessionManager()
public SessionManager getSessionManager()
getSessionManager in interface SessionManagerProviderpublic SessionPool createSessionPool()
public SessionPool getSessionPool()
getSessionPool in interface SessionPoolProviderpublic void setSessionInfo(SessionInfo sessionInfo)
Overwridden to protect the sessioninfo once it is set.
setSessionInfo in class AbstractApplicationprotected void doLogin()
throws ApplicationException
ApplicationException - if login failedprotected void doFinishStartup()
throws ApplicationException
"--nomodthread" given, creates the connection manager, the Db pool,
and the DbServer instance.doFinishStartup in class AbstractApplicationApplicationException - if finish failedprotected void doStartDbServer()
throws ApplicationException
dbServer.start().ApplicationException - if starting the dbServer failedprotected void doStop(int exitValue,
Exception ex)
exitValue - the doStop value for System.exit()ex - an exception causing the termination, null if noneprotected void doStop(int exitValue)
exitValue - the doStop value for System.exit()Copyright © 2016 Krake Softwaretechnik. All rights reserved.