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

Propagation Using HTTP<br />

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

declare<br />

subscriber sys.aq$_agent;<br />

begin<br />

subscriber :=sys.aq$_agent('West_Shipping','WS.WS_bookedorders_topic',null);<br />

dbms_aqadm.add_subscriber(queue_name => 'OE.OE_bookedorders_topic',<br />

subscriber => subscriber,<br />

rule => 'tab.user_data.orderregion =''WESTERN''<br />

AND tab.user_data.ordertype != ''RUSH''',<br />

transformation => 'OE.OE2WS');<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 />

In <strong>Oracle</strong>9i, you can set up <strong>Advanced</strong> <strong>Queuing</strong> propagation over HTTP and HTTPS<br />

(HTTP over SSL). HTTP propagation uses the Internet access infrastructure and<br />

requires that the AQ servlet that connects to the destination database be deployed.<br />

The database link must be created with the connect string indicating the Web server<br />

address and port and indicating HTTP as the protocol. The source database must be<br />

created for running Java and XML. Otherwise, the setup for HTTP propagation is<br />

more or less the same as <strong>Oracle</strong> Net Services (formerly Net8) propagation.<br />

Scenario<br />

In the BooksOnLine example, messages in the OE_bookedorders_que are<br />

propagated to different shipping sites. For the purpose of this scenario, the Western<br />

Shipping application is running on another database, 'dest-db' and we will<br />

propagate to WS_bookedorders_que.<br />

Propagation Setup<br />

1. Deploy the AQ Servlet.<br />

HTTP propagation depends on Internet access to the destination database.<br />

Create a class AQPropServlet that extends the AQxmlServlet.<br />

import java.io.*;<br />

8-118 <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!