115 lines
8.3 KiB
HTML
115 lines
8.3 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="concept" />
|
|
<meta name="DC.Title" content="Commitment definition for two-phase commit: Indicate OK to leave out" />
|
|
<meta name="abstract" content="Normally, the transaction manager at every location in the transaction program network participates in every commit or rollback operation. To improve performance, you can set up some or all locations in a transaction to allow the transaction manager to indicate OK to leave out." />
|
|
<meta name="description" content="Normally, the transaction manager at every location in the transaction program network participates in every commit or rollback operation. To improve performance, you can set up some or all locations in a transaction to allow the transaction manager to indicate OK to leave out." />
|
|
<meta name="DC.Relation" scheme="URI" content="rzakjcommitdefs_tp.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzakjoptimize.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2004, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2004, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rzakjokleaveout" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Commitment definition for two-phase commit: Indicate OK to leave out</title>
|
|
</head>
|
|
<body id="rzakjokleaveout"><a name="rzakjokleaveout"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Commitment definition for two-phase commit: Indicate OK to leave out</h1>
|
|
<div><p>Normally, the transaction manager at every location in the transaction
|
|
program network participates in every commit or rollback operation. To improve
|
|
performance, you can set up some or all locations in a transaction to allow
|
|
the transaction manager to indicate OK to leave out.</p>
|
|
<div class="note"><span class="notetitle">Note:</span> The Indicate OK to leave out option does not apply if you are using
|
|
a DRDA<sup>®</sup> distributed
|
|
unit of work over TCP/IP connection.</div>
|
|
<p>If no communications flows are sent to the location during a transaction,
|
|
the location is left out when a commit or rollback operation is performed.
|
|
This improves overall performance because the communications flows that normally
|
|
occur during the commit or rollback are eliminated during transactions in
|
|
which no data is sent to one or more remote locations.</p>
|
|
<p>After you start commitment control, you can use the Change Commitment Options
|
|
(QTNCHGCO) API to change the OK to leave out option to Y (Yes). You might
|
|
want to do this if one or more remote systems often are not involved in a
|
|
transaction.</p>
|
|
<p>If your commitment definition is set up to indicate OK to leave out, the
|
|
application waits for the next message flow from another location.</p>
|
|
<p>The OK to leave out option is intended for applications that are client/server
|
|
in nature. If the only purpose of program A is to satisfy requests from program
|
|
I and not to do any independent work, then it is appropriate to allow the
|
|
OK to leave out option for program A.</p>
|
|
<div class="section" xml:lang="en-us" id="rzakjokleaveout__flowcommitprocagenptimizwhenagentvotes"><a name="rzakjokleaveout__flowcommitprocagenptimizwhenagentvotes"><!-- --></a><h4 class="sectiontitle">Flow
|
|
of commit processing without last agent optimization when agent votes OK to
|
|
leave out</h4><p>The following figure shows the flow of messages among
|
|
the application programs and the transaction managers when an application
|
|
program issues a commit instruction without last agent optimization when the
|
|
agent indicates OK to leave out. Both the initiator application program and
|
|
the agent application programs are unaware of the two-phase commit processing.
|
|
The numbers in parentheses () in the figure correspond to the numbered items
|
|
in the description that follows.</p>
|
|
<br /><img src="rzakj514.gif" alt="Flow of commit processing without last agent optimization when agent votes OK to leave out" /><br /><p>Here is a description of
|
|
the events for normal processing without last agent optimization when the
|
|
agent votes OK to leave out. This describes a basic flow. The sequence of
|
|
events can become much more complex when the transaction program network has
|
|
multiple levels or when errors occur.</p>
|
|
<ol><li>Application program A does a receive request to indicate that it is ready
|
|
to receive a request from program I.</li>
|
|
<li>The initiator application (I) issues a commit instruction.</li>
|
|
<li>The transaction manager for the initiator (TM-I) takes the role of initiator
|
|
for this transaction. It starts the prepare wave by sending a prepare message
|
|
to all the other locations that are participating in the transaction.</li>
|
|
<li>The transaction managers for every other location take the role of agent
|
|
(TM-A). The application program A is notified by TM-A that a request to commit
|
|
has been received. For ICF files, the notification is in the form of the Receive
|
|
Take Commit (RCVTKCMT) ICF indicator being set on.</li>
|
|
<li>The application program A responds by issuing a commit instruction (or
|
|
a rollback instruction). This is the application program's vote.</li>
|
|
<li>If application program A has used the Change Commitment Options API (QTNCHGCO)
|
|
to set the OK to leave out commitment option to Y, an indicator is sent when
|
|
the agent (TM-A) responds to the initiator (TM-I) with a request commit message.<div class="note"><span class="notetitle">Note:</span> Any
|
|
change to the OK to leave out commitment option does not take effect until
|
|
the next successful commit operation.</div>
|
|
</li>
|
|
<li>When the initiator (TM-I) receives all the votes, the TM-I sends a commit
|
|
message. This starts the committed wave.</li>
|
|
<li>Each agent (TM-A) commits and responds with a reset message.</li>
|
|
<li>A return is sent to the application program (I) to indicate that the transaction
|
|
is complete at the initiator.</li>
|
|
<li>Any number of transactions might occur on TM-I, none of which requires
|
|
changes to TM-A or data from TM-A. TM-A is not included in these transactions.</li>
|
|
<li>The next time the initiator (TM-I) issues a message to the agent (A),
|
|
a new transaction ID is sent with the message. If the initiator performs any
|
|
commit or rollback operations before sending a message to the agent, no messages
|
|
are sent to the agent during those operations (the agent is 'left out' of
|
|
those commits or rollbacks). Because one or more transactions might have been
|
|
committed or rolled back at the initiator while the agent was left out, the
|
|
initiator must communicate its current transaction ID when the next message
|
|
is sent to the agent.</li>
|
|
<li>A return is sent to the application program (A) to indicate that the original
|
|
commit is complete and that it is participating in the current transaction.</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakjcommitdefs_tp.htm" title="After you start commitment control, you can use the Change Commitment Options (QTNCHGCO) API to change the commitment options for your transaction.">Commitment definitions for two-phase commitment control</a></div>
|
|
</div>
|
|
<div class="relconcepts"><strong>Related concepts</strong><br />
|
|
<div><a href="rzakjoptimize.htm" title="Using commitment control requires resources that can affect system performance. Several factors affect system performance regarding commitment control.">Optimize performance for commitment control</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |