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
Configuration of the TS is performed on the DATABASE panel as follows.
Starting a Transaction Server
A PMOD TS is a background process which can be started as part of PMOD, or as processes running independent from the PMOD installation used for its configuration. The behavior is configured using
If Start automatically is enabled, the TS is started/stopped with PMOD, so that the published DB is not always accessible by other PMOD installations. Standalone indicates that a Starting Script is generated as described below, and the TS is executed as an independent process.
Note tat there is dedicated server administration tool which can be used for monitoring, starting and stopping transaction servers for which starting scripts have been created.
Creation of Transaction Server Scripts
Save Starting Script is a facility for generating scripts according to the configured TS properties. It becomes active when the Standalone option is enabled and generates an operating system dependent script which is shown in a dialog window. The options are:
•Verbose commands (-d): Recommended only for debugging purposes, as it slows communication down.
•Redirect output (-o): The TS output will be stored to a log file.
•License Server: Indicates that the TS is managing a network license at the same time as data sharing. If it is not enabled, a -noLS parameter is added to the command script
The example below is the result for a Windows system.
The Yes button saves the shown script to the Pmod4.2/Start directory using the specified Name.
Additional Transaction Server Options
An command line flag which can be added to the script in an editor is -optimize. If it is present, the database table indexes will be optimized before the database gets accessible. Note that this may take notable time for large databases, but it can dramatically improve speed for aging, large databases. To keep the database fast and safe, a TS started with the -optimize flag will backup the database tables to data/DB_Backup/ every Sunday night at 1am and then optimize the indexes.
Another startup option is -upgrade. With this option, a backup of the database is copied to data/DB_Backup/upgrade/, then the database upgrade scripts are executed, a table optimization performed as with -optimize, and finally the TS started.
Transaction Server Status Information
All automatically started transaction servers are available for management from the PMOD ToolBox. TS management is opened by activating the button in the ToolBox:
The current status is displayed in the State column. After selecting an entry in the list, stopped servers can be started using Start selected server(s), or running servers stopped using Stop selected server(s).
When the color of the button changes to blue, a TS request is being served. The color changes back after all communications have completed.
PMOD Status Information
In case of problems with the TS status the PMOD status button in the ToolBox shows a red bullet.
Dedicated Machine for Databases and Transaction Servers
Note that transaction servers can be started and operated without consuming a PMOD license. This allows moving them to a server machine that is continuously operating and has fast disks. On this server machine perform a standard PMOD installation, plug the USB license protection key in, and use the Configuration facility for the database configuration and TS script generation. Then start each of the scripts in a separate command window. In the case of a standalone license, the USB key can now be moved to the computer, where the actual data processing is performed. In the case of a network license the USB key should remain, as it is used for license serving.
It is easy for Mac OSX and Linux to start programs like the TSs at system boot time and run them in the background. On Windows, this is not possible with normal programs. Rather, a command window is required which needs to stay open for the whole program duration, which is not convenient for shared server systems. A workaround is to purchase a third-party solution which wraps the transaction servers into service processes, such as the AlwaysUp solution.
Depending on the network and server performance the speed of the load/save operations via a TS 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.