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

To create AQ agents that can access the servlet using SMTP, use the DBMS_<br />

AQADM.CREATE_AQ_AGENT procedure.<br />

Example<br />

Create an AQ agent for the appl application to access the AQ servlet using SMTP<br />

and the digital certificate of the application owner, Kurt:<br />

DBMS_AQADM.CREATE_AQ_AGENT(<br />

agent_name => ’appl’,<br />

enable_http => true,<br />

enable_smtp => true,<br />

certificate_location => ’cn=kurt,cn=acme,cn=com’);<br />

The certificate_location parameter is required to authenticate the appl<br />

application when a message is received.<br />

Web Server Setup<br />

1. Establish a user called ORACLE_SMTP_AGENT on the Web server that is allowed<br />

to access the AQ servlet.<br />

The <strong>Oracle</strong> e-mail server will connect to the servlet using user ORACLE_SMTP_<br />

AGENT.<br />

2. Specify the e-mail server host name or the IP address in the servlet’s init( )<br />

method.<br />

Use setEmailServerHost(hostname) or setEmailServerAddr(ip_<br />

address)in the AQxmlServlet to do this.<br />

Example: Specify the e-mail server host as follows:<br />

setEmailServerAddr("144.25.186.236"); or<br />

setEmailServerHost("email-srv.us.oracle.com");<br />

3. Set up an LDAP context in the servlet, as described in "Using an LDAP Server<br />

with an AQ XML Servlet" on page 17-54.<br />

The LDAP server is used to retrieve certificates for the AQ agent and verify the<br />

signature in the incoming message.<br />

E-mail Server Setup<br />

Internet access to AQ using SMTP requires <strong>Oracle</strong> Email Server 5.5. Do the<br />

following:<br />

1. Check that DBMS_AQST is installed on the e-mail server.<br />

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