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.

Deploying the AQ XML Servlet<br />

User Authorization<br />

Using HTTP<br />

In the context of the AQ servlet, the user name that is used to connect to the Web<br />

server is known as the AQ HTTP agent or AQ Internet user.<br />

Example: In Apache, the following can be used to restrict access (using basic<br />

authentication) to servlets installed under aqserv/servlet. In this example, all<br />

users sending POST requests to the servlet are authenticated using the users file in<br />

/apache/htdocs/userdb.<br />

<br />

<br />

AuthName "AQ restricted stuff"<br />

AuthType Basic<br />

AuthUserFile /apache/htdocs/userdb/users<br />

require valid-user<br />

<br />

<br />

After authenticating the users who connect to the AQ servlet, you establish which<br />

operations the users are authorized to perform by doing the following:<br />

1. Register the AQ agent for Internet access.<br />

2. Map the AQ agent to one or more database users.<br />

Registering the AQ Agent<br />

To register the AQ agent for Internet access, use DBMS_AQADM.CREATE_AQ_AGENT.<br />

The CREATE_AQ_AGENT procedure takes an agent_name. You specify which<br />

protocols the user can use to access the servlet—HTTP, SMTP, or both. For agents<br />

accessing the AQ servlet using SMTP, an LDAP certificate_location must<br />

also be specified. See "Setup for Receiving AQ XML Requests Using SMTP (E-mail)"<br />

on page 17-55 for more information.<br />

Example<br />

Create an AQ agent JOHN to access the AQ servlet using HTTP.<br />

DBMS_AQADM.CREATE_AQ_AGENT(agent_name => ’JOHN’, enable_http => true);<br />

The procedures ALTER_AQ_AGENT and DROP_AQ_AGENT for altering and dropping<br />

AQ agents function similarly to CREATE_AQ_AGENT. These procedures are<br />

documented in the <strong>Oracle</strong>9i Supplied PL/SQL Packages and Types Reference.<br />

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