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.

Using HTTP and HTTPS for <strong>Advanced</strong> <strong>Queuing</strong> Propagation<br />

2. Create the dblink with protocol as HTTP and the host and port of the Web<br />

server running the AQ servlet, with the username and password for<br />

authentication with the webserver/servlet runner.<br />

For example, if the webserver is running on the machine<br />

webdest.oracle.com and listening for requests on port 8081, then the<br />

connect string of the database is as follows:<br />

(DESCRIPTION=(ADDRESS=(PROTOCOL=http)(HOST=webdest.oracle.com)(PORT=8081))<br />

If SSL is used, then specify HTTPS as the protocol in the connect string.<br />

The database link is created as follows:<br />

create public database link dba connect to john identified by welcome using<br />

'(DESCRIPTION=(ADDRESS=(PROTOCOL=http)(HOST=webdest.oracle.com)(PORT=8081))'<br />

;<br />

Where user john with password welcome is used to authenticate with the Web<br />

server and is also known by the term AQ HTTP agent.<br />

3. You can optionally set a proxy to use for all HTTP requests from the database.<br />

Use the UTL_HTTP.SET_PROXY procedure, as described in <strong>Oracle</strong>9i Supplied<br />

PL/SQL Packages and Types Reference.<br />

4. If HTTP over SSL is used, then a database wallet must be created for the source<br />

database. The wallet must be open for the duration of propagation. If HTTPS is<br />

used for propagation, communication between the source database and the AQ<br />

servlet is encrypted and the HTTPS server is authenticated with the source<br />

database. The database uses the database link username-password to<br />

authenticate itself with the HTTPS server.<br />

5. Deploy the AQ Servlet.<br />

Create a class AQPropServlet that extends AQxmlServlet as described in [create<br />

the AQ XML Servlet Class]. This servlet must connect to the destination<br />

database. The servlet must be deployed on the Web server in the path<br />

aqserv/servlet.<br />

In <strong>Oracle</strong>9i, the propagation servlet name and deployment path are fixed; that<br />

is, they must be AQPropServlet and the servlet, respectively.<br />

6. Make sure that the AQ HTTP agent (John) is authorized to perform AQ<br />

operations. This is done at the destination database:<br />

a. Register the AQ agent as follows:<br />

dbms_aqadm.create_aq_agent(agent_name => 'John', enable_http => true);<br />

17-64 <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!