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

Administrative Interface, 24 of 36


Scheduling a Queue Propagation

Figure 9-23 Use Case Diagram: Schedule a Queue Propagation


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


To refer to the table of all basic operations having to do with the Administrative Interface see:

 

Purpose

Schedule propagation of messages from a queue to a destination identified by a specific dblink.

Usage Notes

Messages may also be propagated to other queues in the same database by specifying a NULL destination. If a message has multiple recipients at the same destination in either the same or different queues the message will be propagated to all of them at the same time.

See Chapter 17, "Internet Access to Advanced Queuing" for information on propagating messages over HTTP rather than Net8.

Syntax

See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:

Examples

See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Examples are provided in the following programmatic environments:

PL/SQL (DBMS_AQADM): Scheduling a Queue Propagation


Note:

You may need to set up the following data structures for certain examples to work:

EXECUTE DBMS_AQADM.CREATE_QUEUE_TABLE (
   queue_table        => 'aq.objmsgs_qtab', 
   queue_payload_type => 'aq.message_typ',
   multiple_consumers => TRUE);
EXECUTE DBMS_AQADM.CREATE_QUEUE (
   queue_name         => 'aq.q1def',
   queue_table        => 'aq.objmsgs_qtab');

 

Schedule a Propagation from a Queue to other Queues in the Same Database

/* Schedule propagation from queue aq.q1def to other queues in the same 
   database  */
EXECUTE DBMS_AQADM.SCHEDULE_PROPAGATION(
   Queue_name    =>    'aq.q1def'); 
  

Schedule a Propagation from a Queue to other Queues in Another Database

/* Schedule a propagation from queue aq.q1def to other queues in another 
   database */
EXECUTE DBMS_AQADM.SCHEDULE_PROPAGATION(
   Queue_name    =>    'aq.q1def', 
   Destination   =>    'another_db.world'); 

Java (JDBC): Scheduling a Queue Propagation

/* Setup  */
public static void setup(AQSession aq_sess) throws AQException
{
     AQQueueTableProperty    qtable_prop;
     AQQueueProperty         queue_prop;
     AQQueueTable            q_table;
     AQQueue                 queue;

     qtable_prop = new AQQueueTableProperty("AQ.MESSAGE_TYP"); 
     qtable_prop.setMultiConsumer(true);

     q_table = aq_sess.createQueueTable ("aq", "objmsgs_qtab", qtable_prop);

     /* Create a new AQQueueProperty object: */
     queue_prop = new AQQueueProperty();
     queue = aq_sess.createQueue (q_table, "q1def", queue_prop);
}

/* Schedule propagation from a queue to other queues in the same database */
public static void example(AQSession aq_sess) throws AQException
{
     AQQueue         queue;
     AQAgent         agent1;        
     AQAgent         agent2;        

     /* Get the queue object */
     queue = aq_sess.getQueue("AQ", "q1def");

     queue.schedulePropagation(null, null, null, null, null);
}

/* Schedule propagation from a queue to other queues in another database */
public static void example(AQSession aq_sess) throws AQException
{
     AQQueue         queue;
     AQAgent         agent1;        
     AQAgent         agent2;        

     /* Get the queue object */
     queue = aq_sess.getQueue("AQ", "q1def");

     queue.schedulePropagation("another_db.world", null, null, null, null);
}


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