SIRA_PRISE server administration operations

Starting the server

Once installed, all it takes to start the server is to run the sp.startsrv.bat (.sh) script from within the server installation directory. You can verify that the server is running successfully by checking any of the following :

  • No error message window pops up on the screen or the system's console.
  • No new SYSTEM.ERR file suddenly appears in the LOGS subdirectory of SIRA_PRISE's data directory.
  • A SERVERENGINE.LOG file (including the date and time the server was started) appears in the LOGS subdirectory of SIRA_PRISE's data directory.
  • If you have a firewall or some other kind of IP activity monitor, check that the Java main program is listening on TCP sockets 50000 and 50002 (of the localhost address).

Please observe that the run scripts in the package are set up to run the server without the java security manager active. If you want to run SIRA_PRISE with the java security manager active, here are the permissions required by the server :

  • grant codeBase "file:/${SP_Home_URL}/sp.server.jar" {
    permission java.util.logging.LoggingPermission "control"
    permission java.io.FilePermission "${SP_Home_DIR}*", "read";
    permission java.io.FilePermission "${SP_Data_DIR}-", "read,write,delete";
    permission java.io.FilePermission "${user.home}\\-", "read,write,delete";
    permission java.io.FilePermission "${user.home}", "read,write";
    permission java.net.SocketPermission "*:1025-", "accept, connect, listen, resolve";
    permission java.util.PropertyPermission "user.*", "read";
    permission java.util.PropertyPermission "user.timezone", "write";
    permission java.lang.RuntimePermission "exitVM";
    permission java.lang.RuntimePermission "shutdownHooks";
    permission java.lang.RuntimePermission "setIO";
    permission java.lang.RuntimePermission "writeFileDescriptor";
    permission javax.management.MBeanServerPermission "createMBeanServer";
    permission javax.management.MBeanPermission "be.SIRAPRISE.server.ServerEngineManager", "registerMBean";
    permission javax.management.MBeanTrustPermission "register";
    };
  • grant codeBase "file:/${SP_Home_URL}/sp.client.jar" {
    permission java.net.SocketPermission "*:1025-", "connect, resolve";
    };

In which ${SP_Home_URL} stands for the SIRA_PRISE installation directory in URL format, e.g. "Program%20Files/Sira_Prise", ${SP_Home_DIR} stands for the same directory in pathname format, e.g. "Program Files\\Sira_Prise\\", and ${SP_Data_DIR} stands for the SIRA_PRISE data directory in pathname format, e.g. "Documents and settings\\All Users\\Shared Documents\\Sira_Prise\\server\\".

Note that java's default permissions grant the "listen" SocketPermission to anyone, so this need not be explicitly specified again if you haven't changed java's default permission setup.

Stopping the server

The server has a builtin timeout (please see the ServerEngineProperties in the javadoc for exact details).  If no client has connected to the server during this period, the server will exit and needs to be restarted.

A running server can explicitly be stopped by executing the sp.stopsrv.bat (.sh) procedure from within the SIRA_PRISE server installation directory.

A running server can also explicitly be stopped using the jconsole.  The SIRA_PRISE engine implements an MBean that allows server administration using java's new "Managed Beans" technology.

All these methods do a graceful shutdown, meaning a.o. that the server will not actually stop before all transactions that were started when the shutdown command was given, have ended.

Obviously, the server will also stop if its thread or process is killed at the OS level. In that case, the server has not been able to shut down gracefully, and it will refuse to start up again until the recovery procedure has been run.

Database recovery

After a forced shutdown, SIRA_PRISE cannot guarantee the consistency/integrity of its databases until the recovery procedure has been run. Running the recovery procedure involves the following steps :

  1. Delete all files from the DATABASES and RESOURCES directories.
  2. Restore the most recent consistent set of database files (= the contents of SIRA_PRISE's DATABASES and RESOURCES directories) from your backup set.
  3. Run the sp.recover.bat procedure, which will do the rollforward using the journals contained in the JOURNALS directory.

Database backups

As you can note from this recovery procedure, database backups consist of the complete contents of the DATABASES and RESOURCES directories. The SIRA_PRISE server must be shut down prior to taking backups. Backups cannot be taken while the server is running.