09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

dbms_aq.enqueue('WS.ws_bookedorders_topic',<br />

enq_opt, msg_prp, booked_order);<br />

RETURN true;<br />

ELSE<br />

RETURN false;<br />

END IF;<br />

END;<br />

Visual Basic (OO4O): Example Code<br />

No example is provided with this release.<br />

Java (JDBC): Example Code<br />

No example is provided with this release.<br />

Enqueue Using the AQ XML Servlet<br />

Enqueue Features<br />

You can perform enqueue requests over the Internet using IDAP. See Chapter 17,<br />

"Internet Access to <strong>Advanced</strong> <strong>Queuing</strong>" for more information on sending AQ<br />

requests using IDAP.<br />

Scenario<br />

In the BooksOnLine application, a customer can request:<br />

FedEx shipping (priority 1),<br />

Priority air shipping (priority 2). or<br />

Regular ground shipping (priority 3).<br />

<br />

The Order Entry application uses a priority queue to store booked orders. Booked<br />

orders are propagated to the regional booked orders queues. At each region, orders<br />

in these regional booked orders queues are processed in the order of the shipping<br />

priorities.<br />

The following calls create the priority queues for the Order Entry application.<br />

PL/SQL (DBMS_AQADM Package): Example Code<br />

/* Create a priority queue table for OE: */<br />

EXECUTE dbms_aqadm.create_queue_table( \<br />

queue_table => 'OE_orders_pr_mqtab', \<br />

sort_list =>'priority,enq_time', \<br />

comment => 'Order Entry Priority \<br />

A Sample Application Using AQ 8-55

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

Saved successfully!

Ooh no, something went wrong!