09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

}<br />

Listening to One or More Multiconsumer Queues<br />

case OCI_NO_DATA:<br />

printf("Error - OCI_NO_DATA\n");<br />

break;<br />

case OCI_ERROR:<br />

OCIErrorGet ((dvoid *) errhp, (ub4) 1, (text *) NULL, &errcode,<br />

errbuf, (ub4) sizeof(errbuf), (ub4) OCI_HTYPE_ERROR);<br />

printf("Error - %s\n", errbuf);<br />

break;<br />

case OCI_INVALID_HANDLE:<br />

printf("Error - OCI_INVALID_HANDLE\n");<br />

break;<br />

case OCI_STILL_EXECUTING:<br />

printf("Error - OCI_STILL_EXECUTE\n");<br />

break;<br />

case OCI_CONTINUE:<br />

printf("Error - OCI_CONTINUE\n");<br />

break;<br />

default:<br />

break;<br />

}<br />

void SetAgent(OCIAQAgent *agent,<br />

text *appname,<br />

text *queue,<br />

OCIError *errhp,<br />

OCIEnv *envhp);<br />

void GetAgent(OCIAQAgent *agent,<br />

OCIError *errhp);<br />

/*----------------------------------------------------------------*/<br />

/* OCI Listen examples for multiconsumers */<br />

/* */<br />

void SetAgent(agent, appname, queue, errhp)<br />

LNOCIAQAgent *agent;<br />

text *appname;<br />

text *queue;<br />

LNOCIError *errhp;<br />

{<br />

OCIAttrSet(agent,<br />

OCI_DTYPE_AQAGENT,<br />

appname ? (dvoid *)appname : (dvoid *)"",<br />

appname ? strlen((const char *)appname) : 0,<br />

OCI_ATTR_AGENT_NAME,<br />

Operational Interface: Basic Operations 11-39

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!