Php/docs/function.mqseries-begin
mqseries_begin
(PECL mqseries >= 0.10.0)
mqseries_begin — MQseries MQBEGIN
说明
mqseries_begin
( resource $hconn
, array $beginOptions
, resource &$compCode
, resource &$reason
) : void
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.
参数
hConnConnection handle.
This handle represents the connection to the queue manager.
compCodeCompletion code.
reasonReason code qualifying the compCode.
返回值
没有返回值。
范例
Example #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)); } }?>
注释
Note:
mqseries_begin() will not function when using MQSeries Client to connect to a Queueu Manager.
参见
- mqseries_conn() - MQSeries MQCONN
- mqseries_connx() - MQSeries MQCONNX
- mqseries_back() - MQSeries MQBACK
- mqseries_cmit() - MQSeries MQCMIT