At application level, you can:
Specify whether the whole application can participate within an OLTP environment as an OLTP client only, or as both a client and a server.
Specify a default OLTP service name so that all OLTP-capable Ispecs in your application is able to be accessed through that single OLTP Service name. For MCP based applications, this applies to each subsystem separately.
Use the Two Phase Commit Segment configuration property under the Runtime Options category to select whether an OLTP Global Transaction is required (for all Ispecs).
Specify the OLTP transaction timeout (in seconds).
Specify if OLTP configuration information (created when your application is built) is loaded automatically into the OLTP CRM software.
Segment Level Configuration Properties
The Two Phase Commit Segment configuration property under the Runtime Options is used by both External Automatic Entry (HUB) and OLTP transactions. This property defines the protocol used for database updating with External Automatic Entries.
Set this property to True to use the Two-Phase commit protocol.
When you use Two-Phase commit with OLTP, the following process occurs:
During the transaction:
Client sends a request for the Automatic Entry.
Server system performs the required processing, but does not commit the transaction. A response is sent to the client.
At the end of the transaction:
Client sends a ready to commit request.
Server acknowledges it is ready to commit.
Client sends a commit request.
Server commits its transaction, and replies.
Client commits its transaction.
The sending and receiving systems can then roll back to a synchronized point, if both have not successfully completed their related transactions.
When you have enabled Two-Phase commit, by setting to True the Two phase Commit Segment configuration property, any OLTP requests initiated defaults to inherit the 2PC status, and forms part of the current Global Transaction. This default can be controlled in your logic, by changing the built-in segment attribute Glb.TwoPC when the Send() built-in persistent class method is invoked on the target attribute. The Send() method takes the appropriate action depending on whether it is an internal or external automatic entry
When you do not use Two-Phase commit with OLTP, the following process occurs:
The client will not initiate a Global Transaction, and any requests to OLTP services is treated as independent transactions.
At the end of processing an OLTP request, the server commits any database changes before sending its reply to the client. These database changes is retained, even if the client aborts its transaction.
Refer to Interfacing to Systems of the Agile Business Suite Administration Guide for the relevant host type for more information about the external automatic entries and online transaction processing.
OLTP Segment Configuration Properties
The Segment configuration properties under the OLTP category in Builder enables you to define your OLTP environment for the specified Configuration. Properties specific to particular host types are indicated:
Client / Server
Select the OLTP Client and Server option for the OLTP Participation
Segment configuration property to specify that your application is to participate in an OLTP environment as both a client and a server.
Select the OLTP Client option to specify that your application is to participate in an OLTP environment as a client only.
Changing Application OLTP Options
By changing the OLTP Client and Server or OLTP Client system option, the OLTP handling code for applications are built. All Ispecs are extracted and compiled during the next application build.
Load OLTP Configuration Data
If your application has been defined as an OLTP server, you can set this Segment configuration property to True to specify that the OLTP configuration information (created when your application is built) is automatically loaded into the OLTP CRM software on your application host during generation.
Note: OLTP configuration information is not distributed to other hosts. You must distribute and load this information manually.
If you do not set this property to True, the configuration information is created, but not loaded. By default, it is set to False.
The configuration information comprises two sets of files: the Buffer Definition files and the Service definition files. Details about the file names for host type are listed in the following table.
Host | View file name |
---|---|
MCP environment | system /OLTPVIEW/ispec |
Developer | Any valid PC path and file name |
The location of the Service definition for each host type is listed in the following table.
Host | Service definition file name |
---|---|
MCP environment | Included in the LINCCNTL file |
Default Service Name
Use this property to enter the default OLTP service name to use for accessing all OLTP-capable Ispecs in your application. By default, it is spaces (no OLTP service).
For an MCP based application, you can enter a unique service name for each subsystem that you want to receive OLTP requests.
Transaction Timeout
Enter the OLTP transaction timeout (in seconds) in this property. The maximum is 9999.
By default, it is 300.