Janus Two-Phase Commit: Difference between revisions
No edit summary |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
<p class="note"><b>Note:</b> This feature is available as of Model 204 release 7.8. It is licensed and purchased separately from Model 204.</p> | |||
Janus Two-Phase Commit support allows transactions running in multiple <var class="product">Model 204</var> Onlines to participate in a single global transaction using the [https://en.wikipedia.org/wiki/Two-phase_commit_protocol two-phase commit protocol]. | Janus Two-Phase Commit support allows transactions running in multiple <var class="product">Model 204</var> Onlines to participate in a single global transaction using the [https://en.wikipedia.org/wiki/Two-phase_commit_protocol two-phase commit protocol]. | ||
In addition, it enables <var class="product">Model 204</var> to participate in a global transaction with an <var class="product">Imagine</var> database server. | In addition, it enables <var class="product">Model 204</var> to participate in a global transaction with an <var class="product">Imagine</var> database server. | ||
Line 29: | Line 30: | ||
RESTART ROLL BACK ERROR STOP ROLL FORWARD | RESTART ROLL BACK ERROR STOP ROLL FORWARD | ||
</p> | </p> | ||
If, as in this example, a certificate must be retrieved from a procedure file, it would be a really bad idea for that procedure file be a file that needs to be recovered. | If, as in this example, a certificate must be retrieved from a procedure file, it would be a really bad idea for that procedure file to be a file that needs to be recovered. | ||
==Classes and methods== | ==Classes and methods== |
Latest revision as of 22:22, 25 April 2022
Note: This feature is available as of Model 204 release 7.8. It is licensed and purchased separately from Model 204.
Janus Two-Phase Commit support allows transactions running in multiple Model 204 Onlines to participate in a single global transaction using the two-phase commit protocol. In addition, it enables Model 204 to participate in a global transaction with an Imagine database server. An Imagine Two-Phase Commit Coordinator is required to act as the two-phase commit coordinator. JANUS commands are used to define and start a two-phase commit port. Since there is no way to specify a 2PC port on two-phase commit related statements and functions, there is no point in specifying more than one 2PC port – if more than one is specified the first started 2PC port is always used.
Configuring Janus Two-Phase Commit
These are the configuaration steps:
- Using a JANUS DEFINE command, define a Janus 2PC that will be used to communicate with the coordinator.
The following is a typical command for a two-phase commit port:
JANUS DEFINE TWOPC * 2PC 10
- Specify the host address or name and port number for the coordinator. This is done with the JANUS ADDCOORDINATOR command as in:
JANUS ADDCOORDINATOR TWOPC IMAGINE IMAGINEHOST.MYDOMAIN.COM 3456
If, as in this example, the coordinator host is specified as a name, a name server must be specified using the JANUS NAMESERVER command.
Recovery
When running recovery (the RESTART command or the REGENERATE command) against journals that might contain global transactions, a JANUS 2PC port must be defined and a coordinator added to that port before the RESTART or REGENERATE command as in:
JANUS NAMESERVER 12.34.56.78 JANUS DEFINE TWOPC * 2PC 5 SSL 0 JANUS ADDCOORD TWOPC IMGCOORD IMGSERV.MYDOMAIN.COM 3333 JANUS ADDCA TWOPC PROCFILE TWOPC.CA JANUS START TWOPC RESTART ROLL BACK ERROR STOP ROLL FORWARD
If, as in this example, a certificate must be retrieved from a procedure file, it would be a really bad idea for that procedure file to be a file that needs to be recovered.
Classes and methods
The Transaction class contains methods:
NewGlobal | to start a global transaction |
---|---|
SetGlobal | to add a branch to a global transaction |