org.tentackle.appworx
Class ApplicationServer

java.lang.Object
  extended by org.tentackle.appworx.AbstractApplication
      extended by org.tentackle.appworx.ApplicationServer

public class ApplicationServer
extends AbstractApplication

Application Server.

Author:
harald

Constructor Summary
ApplicationServer(Class<? extends RemoteDbConnectionImpl> connectionClass)
          Creates an instance of an application server.
 
Method Summary
 ConnectionManager createConnectionManager()
          Creates the connection manager for the client sessions.
 DbPool createDbPool()
          Creates the logical DbPool.
protected  DbServer createDbServer(Class<? extends RemoteDbConnectionImpl> connectionClass)
          Creates the DbServer instance (but does not start it).
The default implementation creates a DbServer.
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 gracefully.
 CommandLine getCommandLine()
          Gets the command line.
 DbServer getDbServer()
          Gets the RMI server.
 void start()
          Starts the application server without further arguments.
 void start(String[] args)
          Starts the application server.
 void stop()
          Gracefully terminates the application server.
 
Methods inherited from class org.tentackle.appworx.AbstractApplication
createContextDb, createDb, createModificationThread, createUserInfo, detectEE, detectJNLP, doConfigureApplication, doInitialize, getContextDb, getDb, getProperties, getProperty, getRunningApplication, getUser, getUser, getUserInfo, installPreferences, installSecurityManager, isDeployedByEE, isDeployedByJNLP, register, securityRulesChanged, setContextDb, setProperties, setUserInfo, unregister, updateUserId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationServer

public ApplicationServer(Class<? extends RemoteDbConnectionImpl> connectionClass)
Creates an instance of an application server.

Parameters:
connectionClass - the class of the connection object to instantiate, null = default or from serverInfo's properties file
Method Detail

getCommandLine

public CommandLine getCommandLine()
Gets the command line.

Returns:
the command line

getDbServer

public DbServer getDbServer()
Gets the RMI server.

Returns:
the RMI dbserver

start

public void start(String[] args)
Starts the application server.

Parameters:
args - the arguments (usually from commandline)

start

public void start()
Starts the application server without further arguments.


stop

public void stop()
Gracefully terminates the application server.


createDbServer

protected DbServer createDbServer(Class<? extends RemoteDbConnectionImpl> connectionClass)
                           throws ApplicationException
Creates the DbServer instance (but does not start it).
The default implementation creates a DbServer.

Parameters:
connectionClass - the class of the connection object to instantiate, null = default or from serverInfo's properties file
Returns:
the created DbServer
Throws:
ApplicationException

createConnectionManager

public ConnectionManager createConnectionManager()
Creates the connection manager for the client sessions. The default creates an MpxConnectionManager.

Returns:
the connection manager

createDbPool

public DbPool createDbPool()
Creates the logical DbPool. The default implementation creates a DefaultDbPool.

Returns:
the database pool, null if don't use a pool

doLogin

protected void doLogin()
                throws ApplicationException
Connects the server to the database backend.

Throws:
ApplicationException

doFinishStartup

protected void doFinishStartup()
                        throws ApplicationException
Finishes the startup.
The default implementation starts the modification thread, unless "--nomodthread" given, creates the connection manager, the Db pool, and the DbServer instance.

Overrides:
doFinishStartup in class AbstractApplication
Throws:
ApplicationException

doStartDbServer

protected void doStartDbServer()
                        throws ApplicationException
Starts the RMI-server. The default implementation just does dbServer.start().

Throws:
ApplicationException

doStop

protected void doStop(int exitValue)
Terminates the application server gracefully.

Parameters:
exitValue - the doStop value for System.exit()


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de