09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

User Sessions and Transactions<br />

After a client is authenticated and connects to the AQ servlet, an HTTP session is<br />

created on behalf of the user. The first request in the session also implicitly starts a<br />

new database transaction. This transaction remains open until it is explicitly<br />

committed or aborted. The responses from the servlet includes the session ID in the<br />

HTTP headers as cookies.<br />

If the client wishes to continue work in the same transaction, it must include this<br />

HTTP header containing the session ID cookie in subsequent requests. This is<br />

automatically done by most Web browsers. However, if you are using a Java or C<br />

client to post requests, this has to be done programmatically. An example of a Java<br />

program used to post requests as part of the same session is given in $ORACLE_<br />

HOME/demo directory.<br />

An explicit commit or rollback must be issued to end the transaction. The commit or<br />

rollback requests can also be included as part of other AQ operations (Send,<br />

Publish, Receive, Register).<br />

Each HTTP session has a default timeout of 120 seconds. If the user does not<br />

commit or rollback the transaction in 120 seconds after the last request that session,<br />

the transaction is automatically aborted. This timeout can be modified in the init()<br />

method of the servlet by using setSessionMaxInactiveTime(). See<br />

"Customizing the AQ Servlet" on page 17-65 for more information.<br />

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

High-Level Architecture<br />

Using <strong>Advanced</strong> <strong>Queuing</strong> propagation in <strong>Oracle</strong>9i, you can propagate over HTTP<br />

and HTTPS (HTTP over SSL) instead of <strong>Oracle</strong> Net Services (formerly Net8). HTTP,<br />

unlike <strong>Oracle</strong> Net Services, is easy to configure for firewalls.<br />

HTTP AQ propagation uses the infrastructure for Internet access to AQ as its basis.<br />

The background process doing propagation pushes messages to an AQ Servlet that<br />

enqueues them into the destination database, as shown in Figure 17–3.<br />

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