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.

Working with Messaging Gateway<br />

Enabling and Disabling Propagation Jobs<br />

When a schedule is created, it is in an enabled state. This means that if there is an<br />

associated subscriber, the corresponding propagation job will be active. That is, it<br />

will be polling for messages in the source queue. To disable (or enable) a<br />

propagation job, the associated schedule must be disabled (or enabled).<br />

The following examples disable and enable the schedule ‘sch_aq2mq’.<br />

begin<br />

dbms_mgwadm.disable_propagation_schedule(‘sch_aq2mq’);<br />

end;<br />

begin<br />

dbms_mgwadm.enable_propagation_schedule(‘sch_aq2mq’);<br />

end;<br />

Resetting Propagation Jobs<br />

When a problem occurs in propagation, the Messaging Gateway agent retries the<br />

failed operation up to 16 times before the propagation job stops. To restart the<br />

propagation job with the error count reset to zero, use the reset_subscriber( )<br />

procedure.<br />

Restarting a Propagation Job: Example<br />

begin<br />

dbms_mgwadm.reset_subscriber(‘sub_aq2mq’);<br />

end;<br />

Altering Subscribers and Schedules<br />

The following parameters can be altered after the subscriber is created: the selection<br />

rule, the transformation, and the exception queue. The value DBMS_MGWADM.NO_<br />

CHANGE indicates that the value of the parameter has not changed.<br />

Altering Subscribers and Schedules: Example<br />

begin<br />

dbms_mgwadm.alter_subscriber(<br />

subscriber_id => 'sub_aq2mq', -- MGW subscriber name<br />

rule => dbms_mgwadm.NO_CHANGE, -- selection rule not changed<br />

-- not used with MQSeries<br />

transformation => dbms_mgwadm.NO_CHANGE, -- transformation invoked on<br />

-- dequeue not changed<br />

exception_queue => ‘mgwuser.my_ex_queue’); -- register exception<br />

-- queue: same type as source<br />

18-22 <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!