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.

The mgw.ora Initialization File<br />

to_type => ‘book_order_typ’,<br />

transformation => ‘mgwuser.fnc_basic2order(source.user_data)’);<br />

END;<br />

/<br />

Run the following script as a user with MGW_ADMINSTRATOR_ROLE privilege to<br />

create an inbound propagation job.<br />

-- create an inbound propagation with the transformation<br />

BEGIN<br />

dbms_mgwadm.add_subscriber(<br />

subscriber_id => ‘sub_fq2aq’,<br />

propagation_type => dbms_mgwadm.inbound_propagation,<br />

queue_name => ‘FQ_book_orders@fqlink’',<br />

destination => ‘mgwuser.AQ_book_orders’,<br />

transformation => ‘mgwuser.basic2order’);<br />

-- create a schedule for the inbound propagation<br />

dbms_mgwadm.schedule_propagation(<br />

schedule_id => ‘sch_fq2aq’,<br />

propagation_type => dbms_mgwadm.inbound_propagation,<br />

source => ‘FQ_book_orders@fqlink’,<br />

destination => ‘mgwuser.AQ_book_orders’);<br />

END;<br />

/<br />

After the preceding scripts run successfully, all book order messages sent to the<br />

third-party queue as XML documents conforming to the XML schema associated<br />

with the PL/SQL type book_order_typ are propagated to the AQ queue.<br />

The mgw.ora Initialization File<br />

Messaging Gateway can get additional initialization information from a text file that<br />

is read when the Messaging Gateway agent starts. This initialization file is optional,<br />

although it is recommended for setting the environment needed by the Messaging<br />

Gateway agent. For example, it may be easier to use the initialization file to set the<br />

library path and classpath since these typically need to include paths for shared<br />

libraries and Java classes needed to access the <strong>Oracle</strong> database as well as the<br />

non-<strong>Oracle</strong> messaging systems.<br />

Name: mgw.ora<br />

Location: /mgw/admin<br />

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