- java.lang.Object
-
- org.tentackle.app.AbstractApplication
-
- org.tentackle.persist.app.AbstractServerApplication
-
- org.tentackle.persist.app.ServerApplication
-
- All Implemented Interfaces:
org.tentackle.dbms.ConnectionManagerProvider,org.tentackle.pdo.DomainContextProvider,org.tentackle.session.SessionPoolProvider,org.tentackle.session.SessionProvider
public abstract class ServerApplication extends AbstractServerApplication
RMI Application Server.- Author:
- harald
-
-
Constructor Summary
Constructors Constructor Description ServerApplication(java.lang.String name, java.lang.String version, java.lang.Class<? extends org.tentackle.dbms.rmi.RemoteDbConnectionImpl> connectionClass)Creates an instance of an application server.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcleanup()protected org.tentackle.dbms.rmi.RmiServercreateRmiServer(java.lang.Class<? extends org.tentackle.dbms.rmi.RemoteDbConnectionImpl> connectionClass)Creates the RMI-server instance (but does not start it).
The default implementation creates aRmiServer.protected voidfinishStartup()org.tentackle.dbms.rmi.RmiServergetRmiServer()Gets the RMI server.static ServerApplicationgetServerApplication()Gets the running server application.protected voidinitializeScripting()protected voidstartRmiServer()Starts the RMI-server.
The default implementation just doesrmiServer.start().protected voidstartup()protected voidvalidateValidators()Validates the validators.
The default implementation loads allValidators of all PDO classes and invokesValidator.validate().-
Methods inherited from class org.tentackle.persist.app.AbstractServerApplication
activateStatistics, configureModificationTracker, configurePreferences, configureSessionInfo, createConnectionManager, createSessionPool, deregisterJdbcDrivers, detectContainer, getConnectionManager, getSession, getSessionPool, isRunningInContainer, isServerImpl, isSystemExitNecessaryToStop, login, setSessionInfo
-
Methods inherited from class org.tentackle.app.AbstractApplication
applyProperties, configure, configureSecurityManager, createDomainContext, createSession, createSessionInfo, getCommandLine, getCreationTime, getDomainContext, getName, getProperties, getProperty, getRunningApplication, getSessionInfo, getUser, getUser, getVersion, initialize, isInteractive, isInteractiveImpl, isServer, logStackdump, register, setDomainContext, setProperties, start, start, stop, stop, toString, unregister
-
-
-
-
Constructor Detail
-
ServerApplication
public ServerApplication(java.lang.String name, java.lang.String version, java.lang.Class<? extends org.tentackle.dbms.rmi.RemoteDbConnectionImpl> connectionClass)Creates an instance of an application server.- Parameters:
name- the application nameversion- the application versionconnectionClass- the class of the connection object to instantiate, null = default or from serverInfo's properties file
-
-
Method Detail
-
getServerApplication
public static ServerApplication getServerApplication()
Gets the running server application.- Returns:
- the application
-
getRmiServer
public org.tentackle.dbms.rmi.RmiServer getRmiServer()
Gets the RMI server.- Returns:
- the RMI server
-
startup
protected void startup()
- Overrides:
startupin classAbstractServerApplication
-
initializeScripting
protected void initializeScripting()
- Overrides:
initializeScriptingin classorg.tentackle.app.AbstractApplication
-
validateValidators
protected void validateValidators()
Validates the validators.
The default implementation loads allValidators of all PDO classes and invokesValidator.validate(). This will load allCompoundValues and compiles the scripts, if any.
-
createRmiServer
protected org.tentackle.dbms.rmi.RmiServer createRmiServer(java.lang.Class<? extends org.tentackle.dbms.rmi.RemoteDbConnectionImpl> connectionClass)
Creates the RMI-server instance (but does not start it).
The default implementation creates aRmiServer.- Parameters:
connectionClass- the class of the connection object to instantiate, null = default or from serverInfo's properties file- Returns:
- the created RmiServer
-
finishStartup
protected void finishStartup()
- Overrides:
finishStartupin classAbstractServerApplication
-
startRmiServer
protected void startRmiServer()
Starts the RMI-server.
The default implementation just doesrmiServer.start().
-
cleanup
protected void cleanup()
- Overrides:
cleanupin classAbstractServerApplication
-
-