Example #1
0
    $correlid = $conn->send($queuename, $msg);
    if (!$correlid) {
        echo '<font color="red"><b>FAILED</b></font>' . " ({$conn->errno}) {$conn->error}";
    } else {
        echo '<font color="green"><b>OK</b></font> correlID=' . $correlid;
    }
} else {
    echo '<font color="red"><b>FAILED</b></font> previous connection create test failed!';
}
?>
<p/>
<hr/>
Rolling back the message -<br/>
<?php 
if ($conn) {
    if (!$conn->rollback()) {
        echo '<font color="red"><b>FAILED</b></font> rollback failed! ' . " ({$conn->errno}) {$conn->error}";
    } else {
        echo '<font color="green"><b>OK</b></font>';
    }
} else {
    echo '<font color="red"><b>FAILED</b></font> previous connection create test failed!';
}
?>
<p/>
<hr/>
Attempting receive using 2nd connection -<br/>
<?php 
if ($conn2) {
    $msg = $conn2->receive($queuename, array(SAM_WAIT => 5000));
    if ($msg) {