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.

General Features of <strong>Advanced</strong> <strong>Queuing</strong><br />

static char *logon = "LOGON";<br />

static char *logoff = "LOGOFF";<br />

/* The possible consumer names of queues: */<br />

static char *applist[] = {"APP1", "APP2","APP3"};<br />

static OCIEnv *envhp;<br />

static OCIServer *srvhp;<br />

static OCIError *errhp;<br />

static OCISvcCtx *svchp;<br />

static void checkerr(/*_ OCIError *errhp, sword status _*/);<br />

struct process_statistics<br />

{<br />

ub4 logon;<br />

ub4 logoff;<br />

};<br />

typedef struct process_statistics process_statistics;<br />

int main(/*_ int argc, char *argv[] _*/);<br />

/* Notify Callback: */<br />

ub4 notifyCB(ctx, subscrhp, pay, payl, desc, mode)<br />

dvoid *ctx;<br />

LNOCISubscription *subscrhp;<br />

dvoid *pay;<br />

ub4 payl;<br />

dvoid *desc;<br />

ub4 mode;<br />

{<br />

text *subname; /* subscription name */<br />

ub4 lsub; /* length of subscription name */<br />

text *queue; /* queue name */<br />

ub4 *lqueue; /* queue name */<br />

text *consumer; /* consumer name */<br />

ub4 lconsumer;<br />

text *correlation;<br />

ub4 lcorrelation;<br />

ub4 size;<br />

ub4 appno;<br />

OCIRaw *msgid;<br />

OCIAQMsgProperties *msgprop; /* message properties descriptor */<br />

process_statistics *user_count = (process_statistics *)ctx;<br />

8-20 <strong>Oracle</strong>9i Application Developer’s Guide - <strong>Advanced</strong> <strong>Queuing</strong>

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

Saved successfully!

Ooh no, something went wrong!