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.

Propagation Features<br />

Scenario<br />

In the BooksOnLine example, the ES_bookedorders_que in the Eastern Shipping<br />

region is stopped intentionally using the stop_queue() call. After a short while the<br />

propagation schedule for OE_bookedorders_que will display an error indicating<br />

that the remote queue ES_bookedorders_que is disabled for enqueuing. When the<br />

ES_bookedorders_que is started using the start_queue() call, propagation to<br />

that queue resumes and there is no error message associated with schedule for OE_<br />

bookedorders_que.<br />

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

/* Intentionally stop the eastern shipping queue : */<br />

connect BOLADM/BOLADM<br />

EXECUTE dbms_aqadm.stop_queue(queue_name => 'ES.ES_bookedorders_que');<br />

/* Wait for some time before error shows up in dba_queue_schedules: */<br />

EXECUTE dbms_lock.sleep(100);<br />

/* This query will return an ORA-25207 enqueue failed error: */<br />

SELECT qname, last_error_msg from dba_queue_schedules;<br />

/* Start the eastern shipping queue: */<br />

EXECUTE dbms_aqadm.start_queue(queue_name => 'ES.ES_bookedorders_que');<br />

/* Wait for Propagation to resume for eastern shipping queue: */<br />

EXECUTE dbms_lock.sleep(100);<br />

/* This query will indicate that there are no errors with propagation:<br />

SELECT qname, last_error_msg from dba_queue_schedules;<br />

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

This functionality is handled by the database.<br />

Java (JDBC): Example Code<br />

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

Message Format Transformation During Propagation<br />

At propagation time, a transformation can be specified when adding a rule-based<br />

subscriber to OE_bookedorders_topic for Western shipping orders. The<br />

transformation is applied to the orders, transforming them to the WS.order_typ_<br />

sh type before propagating them to WS_bookedorders_topic.<br />

A Sample Application Using AQ 8-117

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

Saved successfully!

Ooh no, something went wrong!