Oracle9i Application Developer's Guide - Advanced Queuing
Release 1 (9.0.1)

Part Number A88890-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Internet Access to Advanced Queuing, 7 of 9


Using HTTP and HTTPS for Advanced Queuing Propagation

Using Advanced Queuing propagation in Oracle9i, you can propagate over HTTP and HTTPS (HTTP over SSL) instead of Oracle Net Services (formerly Net8). HTTP, unlike Oracle Net Services, is easy to configure for firewalls.

High-Level Architecture

HTTP AQ propagation uses the infrastructure for Internet access to AQ as its basis. The background process doing propagation pushes messages to an AQ Servlet that enqueues them into the destination database, as shown in Figure 17-3.

Figure 17-3 HTTP Advanced Queuing Propagation

Text description of qintnet2.gif follows
Text description of the illustration qintnet2.gif

Since HTTP propagation is different from Net Services in only the transport, most of the setup is the same as for Net Services propagation. The additional steps and differences are outlined below.

Setting Up for HTTP Propagation (and the Differences from Net Services Propagation)

  1. The dblink at the source database must be created differently. The connect string should specify the protocol as HTTP and specify the host and port of the Web server running the AQ servlet. The username and password of the dblink will be used for authentication with the Web server/servlet runner.

  2. An AQ servlet that connects to the destination database should be deployed.

  3. The source database must be enabled for running Java and XML.

The rest of the steps for propagation remain the same. The administrator must use dbms_aqadm.schedule_propagation to start propagation. Propagation can be disabled with the dbms_aqadm.disable_propagation_schedule and re-enabled using dbms_aqadm.enable_propagation_schedule. The background processes, the job queue processes propagate the messages to the destination database.The job_queue_processes parameters must be at least 2 for propagation to take place.

Any application can be easily set up to use AQ HTTP propagation without any change to the existing code, by following steps 1-3. Similarly an application using AQ http propagation can easily switch back to Net Services propagation just by recreating the dblink with a Net Services connection string, without any other changes.

Setting Up for AQ propagation over HTTP

  1. The source database must be created for running Java and XML.

  2. Create the dblink with protocol as HTTP and the host and port of the Web server running the AQ servlet, with the username and password for authentication with the webserver/servlet runner.

    For example, if the webserver is running on the machine webdest.oracle.com and listening for requests on port 8081, then the connect string of the database is as follows:

    (DESCRIPTION=(ADDRESS=(PROTOCOL=http)(HOST=webdest.oracle.com)(PORT=8081))
    
    

    If SSL is used, then specify HTTPS as the protocol in the connect string.

    The database link is created as follows:

    create public database link dba connect to john identified by welcome using 
    '(DESCRIPTION=(ADDRESS=(PROTOCOL=http)(HOST=webdest.oracle.com)(PORT=8081))'
    ;
    
    

    Where user john with password welcome is used to authenticate with the Web server and is also known by the term AQ HTTP agent.

  3. If HTTP over SSL is used, then a database wallet must be created for the source database. The wallet must be open for the duration of propagation. If HTTPS is used for propagation, communication between the source database and the AQ servlet is encrypted and the HTTPS server is authenticated with the source database. The database uses the database link username-password to authenticate itself with the HTTPS server.

  4. Deploy the AQ Servlet.

    Create a class AQPropServlet that extends AQxmlServlet as described in [create the AQ XML Servlet Class]. This servlet must connect to the destination database. The servlet must be deployed on the Web server in the path aqserv/servlet.

    In Oracle9i, the propagation servlet name and deployment path are fixed; that is, they must be AQPropServlet and the servlet, respectively.

  5. Make sure that the AQ HTTP agent (John) is authorized to perform AQ operations. This is done at the destination database:

    1. Register the AQ agent as follows:

      dbms_aqadm.create_aq_agent(agent_name => 'John', enable_http => true);
      
      
    2. Map the AQ agent to a database user as follows:

      dbms_aqadm.enable_db_access(agent_name =>'John', db_username =>'CBADM')'
          
      
  6. Start propagation at the source site by calling:

    dbms_aqdm.schedule_propagation.
    dbms_aqadm.schedule_propagation('src_queue', 'dba');
    

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback