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.

. Map the AQ agent to a database user as follows:<br />

Customizing the AQ Servlet<br />

dbms_aqadm.enable_db_access(agent_name =>'John', db_username =>'CBADM')'<br />

7. Start propagation at the source site by calling:<br />

dbms_aqdm.schedule_propagation.<br />

dbms_aqadm.schedule_propagation('src_queue', 'dba');<br />

Using SMTP to Access the AQ Servlet<br />

The general procedure for an AQ client to make a request to the AQ servlet using<br />

SMTP is as follows:<br />

1. The client creates a message with the AQ XML client request. The client signs<br />

the message with its private key using the <strong>Oracle</strong> S/MIME toolkit.<br />

2. The client names the message with a substring, IDAP_MESSAGE, and sends it as<br />

a binary attachment to the database e-mail address.<br />

3. The e-mail server receives the message.<br />

4. The e-mail server triggers the rule registered for the database e-mail address,<br />

which does the following:<br />

a. Connects to the LDAP server and retrieves the certificate of the sending AQ<br />

agent<br />

b. Verifies the signature of the message<br />

c. Connects to the Web server as user ORACLE_SMTP_AGENT if authentication<br />

succeeds, and sends an HTTP POST message containing the client request<br />

The procedure for the AQ servlet to process a request is described in "AQ Servlet<br />

Processes a Request Using HTTP" on page 17-60. When the servlet sends a response,<br />

the e-mail server sends an e-mail message containing the XML response to the<br />

address specified in the reply-to field of the original e-mail message.<br />

Customizing the AQ Servlet<br />

The oracle.AQ.xml.AQxmlServlet provides the API to set the connection pool size,<br />

session timeout, style sheet, and callbacks before and after AQ operations.<br />

Internet Access to <strong>Advanced</strong> <strong>Queuing</strong> 17-65

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!