Previous Topic

Next Topic

Book Contents

Book Index

Setting up a Transaction Server to Publish a Database

If a PMOD installation has a JDBC database running, it can make the data available for other PMOD installations. To this end a server program - the Transaction Server (TS) - must be started to run in the background and wait for database access requests.

Transaction Server Configuration

The transaction server requires the following configuration items, which are visible on the DB TRANSACTION SERVER sub-pane:

Transaction Server Configuration

Starting a Transaction Server

The PMOD transaction server is a background process. It can be started in one of the following ways:

  1. Automatically by user login: If Start DB Transaction Server automatically after user login has been configured in the DB TRANSACTION SERVER configuration page the transaction server is started as soon as a user logs in.
  2. Manually from the PMOD ToolBox: If automatic starting is not enabled, the user can launch the transaction server explicitly after he as logged in with the Button Transaction Server Start button on the ToolBox.
    After starting and if the Button Transaction Server Start button is activated while the transaction server is running, it displays the transaction server configuration in a dialog window, for example:
    PMOD Transaction Server Summary
    Note: When the color of the Button Transaction Server Start button changes to blue, a transaction server request is being served. The color changes back after all communications have completed.
  3. By running a command script: A script for starting a Transaction Server is specific for the operating system platform. A start script RunDbSvr with the default configuration is created at installation time in the Start directory. Scripts with a different configuration can easily be generated on the DB Transaction Server configuration pane. As an example, the RunDcmSvr script for Windows and Derby looks as follows:
    C:
    cd "C:\Pmod3.1"
    .\java\jre\bin\java -version
    .\java\jre\bin\java -Xmx1200M -jar pmtsvr.jar 5100 JAVA_DB org.apache.derby.jdbc.EmbeddedDriver jdbc:derby:./DATABASES/Pmod ./DBDATA/Pmod/ -d -noLS

    A script for mySQL has a different driver specification
    C:
    cd "C:\Pmod3.1"
    .\java\jre\bin\java -version
    .\java\jre\bin\java -Xmx1200M -jar pmtsvr.jar 5100 MY_SQL org.gjt.mm.mysql.Driver jdbc:mysql://localhost/Pmod ./DBDATA/Pmod/ -d -noLS

    This mySQL script requires that the root user has an empty password. If this is not the case, the user and password must be specified as additional command line arguments:
    .\java\jre\bin\java -Xmx1200M -jar pmtsvr.jar 5100 MY_SQL org.gjt.mm.mysql.Driver jdbc:mysql://localhost/Pmod ./DBDATA/Pmod/ -d -noLS root password

Note: Methods 1 and 2 only allow to publish a single database. Method 3 is not limited in this sense. A script can be run for each database in parallel. In this case, the transaction servers must be started using unique port numbers (eg. 5100, 5101, 5102, ...).

For best performance transaction servers should be run on a machine that is continuously operating and has fast disks. Depending on the network and server performance the speed of the load/save operations may be slower than with local loading/saving. The benefit however is the global availability and centralized maintenance of the data.

CAUTION: Note that the proper interaction between the transaction server and clients requires that all systems run the same PMOD version.