Sha256: 1de59a4814896d0cea82219e4a678398197259096efacba447197df7d1ca0d62

Contents?: true

Size: 1.99 KB

Versions: 2

Compression:

Stored size: 1.99 KB

Contents

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>commit (WMQ::QueueManager)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre>/*
 * Commit the current unit of work for this QueueManager instance
 *
 * Note:
 * * commit will have no effect if all put and get operations were performed
 *   without specifying :sync =&gt; true
 *
 * Returns:
 * * true : On Success
 * * false: On Failure
 *
 *   comp_code and reason_code are also updated.
 *   reason will return a text description of the reason_code
 *
 * Throws:
 * * WMQ::WMQException if comp_code != MQCC_OK
 * * Except if :exception_on_error =&gt; false was supplied as a parameter
 *   to QueueManager.new
 */
VALUE QueueManager_commit(VALUE self)
{
    PQUEUE_MANAGER pqm;
    Data_Get_Struct(self, QUEUE_MANAGER, pqm);

    if(pqm-&gt;trace_level) printf (&quot;WMQ::QueueManager#commit() Queue Manager Handle:%ld\n&quot;, pqm-&gt;hcon);

    pqm-&gt;MQCMIT(pqm-&gt;hcon, &amp;pqm-&gt;comp_code, &amp;pqm-&gt;reason_code);

    if(pqm-&gt;trace_level) printf(&quot;WMQ::QueueManager#commit() MQCMIT completed with reason:%s\n&quot;, wmq_reason(pqm-&gt;reason_code));

    if (pqm-&gt;comp_code != MQCC_OK)
    {
        if (pqm-&gt;exception_on_error)
        {
            VALUE name = rb_iv_get(self,&quot;@name&quot;);
            name = StringValue(name);

            rb_raise(wmq_exception,
                     &quot;WMQ::QueueManager#commit(). Error commiting changes to Queue Manager:%s, reason:%s&quot;,
                     RSTRING(name)-&gt;ptr,
                     wmq_reason(pqm-&gt;reason_code));
        }
        return Qfalse;
    }

    return Qtrue;
}</pre>
</body>
</html>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubywmq-0.3.0-i386-mswin32-mq6 doc/classes/WMQ/QueueManager.src/M000022.html
rubywmq-0.3.0-i386-mswin32-mq5.3 doc/classes/WMQ/QueueManager.src/M000022.html