array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.mqseries-begin.php', 1 => 'mqseries_begin', ), 'up' => array ( 0 => 'ref.mqseries.php', 1 => 'mqseries 函数', ), 'prev' => array ( 0 => 'function.mqseries-back.php', 1 => 'mqseries_back', ), 'next' => array ( 0 => 'function.mqseries-close.php', 1 => 'mqseries_close', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/mqseries/functions/mqseries-begin.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL mqseries >= 0.10.0)
mqseries_begin — MQseries MQBEGIN
The mqseries_begin() (MQBEGIN) call begins a unit of work that is coordinated by the queue manager, and that may involve external resource managers.
Using mqseries_begin() starts the unit of work. Either mqseries_back() or mqseries_cmit() ends the unit of work.
hConn
Connection handle.
This handle represents the connection to the queue manager.
compCode
Completion code.
reason
Reason code qualifying the compCode.
没有返回值。
示例 #1 mqseries_begin() example
<?php
$mqbo = array();
mqseries_begin( $conn,
$mqbo,
$comp_code,
$reason);
if ($comp_code !== MQSERIES_MQCC_OK) {
/* reason code 2121 is a warning for more information see MQSeries reference manual.*/
if ($reason !== 2121) {
printf("CompCode:%d Reason:%d Text:%s<br>\n", $comp_code, $reason, mqseries_strerror($reason));
}
}
?>
注意:
mqseries_begin() will not function when using MQSeries Client to connect to a Queueu Manager.