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 />

Creating a multiconsumer queue with prioritized messages<br />

public static void example(AQSession aq_sess) throws AQException<br />

{<br />

AQQueueTableProperty qtable_prop;<br />

AQQueueProperty queue_prop;<br />

AQQueueTable q_table;<br />

AQQueue queue;<br />

AQAgent agent;<br />

qtable_prop = new AQQueueTableProperty("RAW");<br />

qtable_prop.setMultiConsumer(true);<br />

qtable_prop.setSortOrder("priority,enq_time");<br />

q_table = aq_sess.createQueueTable ("aq", "PriorityMsgs_qtab",<br />

qtable_prop);<br />

}<br />

Creating a Queue<br />

queue_prop = new AQQueueProperty();<br />

queue = aq_sess.createQueue (q_table, "priority_msg_queue", queue_prop);<br />

Administrative Interface 9-25

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

Saved successfully!

Ooh no, something went wrong!