Skip Headers

Oracle9i Application Developer's Guide - Advanced Queuing
Release 2 (9.2)

Part Number A96587-01
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 next page

13
JMS Administrative Interface: Basic Operations

In this chapter we describe the administrative interface to Oracle Advanced Queuing in terms of use cases. That is, we discuss each operation (such as "Creating a Queue Table") as a use case by that name. A table listing all the use cases is provided at the head of the chapter (see Use Case Model: JMS Administrative Interface -- Basic Operations on page 13-2).

A summary figure, "Use Case Diagram: Administrator's Interface -- Basic Operations", locates all the use cases in a single drawing. If you are using the HTML version of this document, you can use this figure to navigate to the use case in which you are interested, by clicking on the relevant use case title.

Each use case is laid out as follows:

Use Case Model: JMS Administrative Interface -- Basic Operations

Table 13-1  Use Case Model: JMS Administrative Interface -- Basic Operations
Use Case

Registering a Queue/Topic Connection Factory Through the Database--with JDBC Connection Parameters

Registering a Queue/Topic Connection Factory Through the Database--with a JDBC URL

Registering a Queue/Topic Connection Factory Through LDAP--with JDBC Connection Parameters

Registering a Queue/Topic Connection Factory Through LDAP--with a JDBC URL

Unregistering a Queue/Topic Connection Factory in LDAP Through the Database

Unregistering a Queue/Topic Connection Factory in LDAP Through LDAP

Getting a Queue Connection Factory with JDBC URL

Getting a Queue Connection Factory with JDBC Connection Parameters

Getting a Topic Connection Factory with JDBC URL

Getting a Topic Connection Factory with JDBC Connection Parameters

Getting a Queue/Topic Connection Factory in LDAP

Getting a Queue/Topic in LDAP

Creating a Queue Table

Creating a Queue Table [Specify Queue Table Property]

Getting a Queue Table

Specifying Destination Properties

Creating a Queue--Point-to-Point

Creating a Topic--Publish-Subscribe

Granting System Privileges

Revoking System Privileges

Granting Topic Privileges--Publish-Subscribe

Revoking Topic Privileges--Publish-Subscribe

Granting Queue Privileges--Point-to-Point

Revoking Queue Privileges--Point-to-Point

Starting a Destination

Stopping a Destination

Altering a Destination

Dropping a Destination

Scheduling a Propagation

Enabling a Propagation Schedule

Altering a Propagation Schedule

Disabling a Propagation Schedule

Unscheduling a Propagation

Registering a Queue/Topic Connection Factory Through the Database--with JDBC Connection Parameters

Figure 13-1 Registering Through the Database with JDBC Connection Parameters

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


See Also:

Purpose

Register a queue/topic connection factory through the database with JDBC connection parameters to LDAP.

Usage Notes

registerConnectionFactory is a static method. To successfully register the connection factory, the DB connection passed to registerConnectionFactory must be granted AQ_ADMINISTRATOR_ROLE. After registration, look up the connection factory using JNDI.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference, oracle.jms, AQjmsFactory.registerConnectionFactory.

Example

String               url;
java.sql.connection  db_conn;

url = "jdbc:oracle:thin:@sun-123:1521:db1";
db_conn = DriverManager.getConnection(url, "scott", "tiger");
AQjmsFactory.registerConnectionFactory(db_conn, "queue_conn1", "sun-123",
  "db1", 1521, "thin", "queue");

Registering a Queue/Topic Connection Factory Through the Database--with a JDBC URL

Figure 13-2 Registering Through the Database with a JDBC URL

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


See Also:

Purpose

Register a queue/topic connection factory through the database with a JDBC URL to LDAP.

Usage Notes

registerConnectionFactory is a static method. To successfully register the connection factory, the DB connection passed to registerConnectionFactory must be granted AQ_ADMINISTRATOR_ROLE. After registration, look up the connection factory using JNDI.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference, oracle.jms, AQjmsFactory.registerConnectionFactory.

Example

String                        url;
java.sql.connection           db_conn;

url = "jdbc:oracle:thin:@sun-123:1521:db1";
db_conn = DriverManager.getConnection(url, "scott", "tiger");
AQjmsFactory.registerConnectionFactory(db_conn, "topic_conn1", url,
   null, "topic");

Registering a Queue/Topic Connection Factory Through LDAP--with JDBC Connection Parameters

Figure 13-3 Registering Through LDAP with JDBC Connection Parameters

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


See Also:

Purpose

Register a queue/topic connection factory through LDAP with JDBC connection parameters to LDAP.

Usage Notes

registerConnectionFactory is a static method. To successfully register the connection factory, the hashtable passed to registerConnectionFactory must contain all the information to establish a valid connection to the LDAP server. Furthermore, the connection must have write access to the connection factory entries in the LDAP server (which requires the LDAP user to be either the database itself or be granted global_aq_user_role). After registration, look up the connection factory using JNDI.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsFactory.registerConnectionFactory.

Example

Hashtable            env = new Hashtable(5, 0.75f);
/* the following statements set in hashtable env:
   * service provider package
   * the URL of the ldap server
   * the distinguished name of the database server
   * the authentication method (simple)
   * the LDAP user name
   * the LDAP user password
*/
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://sun-456:389");
env.put("searchbase", "cn=db1,cn=Oraclecontext,cn=acme,cn=com");
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "cn=db1aqadmin,cn=acme,cn=com");
env.put(Context.SECURITY_CREDENTIALS, "welcome");

AQjmsFactory.registerConnectionFactory(env, "queue_conn1", "sun-123",
  "db1", 1521, "thin", "queue");

Registering a Queue/Topic Connection Factory Through LDAP--with a JDBC URL

Figure 13-4 Registering Through LDAP with a JDBC URL

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


See Also:

Purpose

Register a queue/topic connection factory through LDAP with JDBC connection parameters to LDAP.

Usage Notes

registerConnectionFactory is a static method. To successfully register the connection factory, the hashtable passed to registerConnectionFactory must contain all the information to establish a valid connection to the LDAP server. Furthermore, the connection must have write access to the connection factory entries in the LDAP server (which requires the LDAP user to be either the database itself or be granted global_aq_user_role). After registration, look up the connection factory using JNDI.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsFactory.registerConnectionFactory.

Example

String               url;
Hashtable            env = new Hashtable(5, 0.75f);

/* the following statements set in hashtable env:
   * service provider package
   * the URL of the ldap server
   * the distinguished name of the database server
   * the authentication method (simple)
   * the LDAP user name
   * the LDAP user password
*/
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://sun-456:389");
env.put("searchbase", "cn=db1,cn=Oraclecontext,cn=acme,cn=com");
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "cn=db1aqadmin,cn=acme,cn=com");
env.put(Context.SECURITY_CREDENTIALS, "welcome");
url = "jdbc:oracle:thin:@sun-123:1521:db1";
AQjmsFactory.registerConnectionFactory(env, "topic_conn1", url, null, "topic");

Unregistering a Queue/Topic Connection Factory in LDAP Through the Database

Figure 13-5 Unregistering a Queue/Topic Connection Factory in LDAP Through the Database

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


See Also:

Purpose

Unregister a queue/topic connection factory in LDAP.

Usage Notes

unregisterConnectionFactory is a static method. To successfully unregister the connection factory, the DB connection passed to unregisterConnectionFactory must be granted AQ_ADMINISTRATOR_ROLE.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsFactory.unregisterConnectionFactory.

Example

String               url;
java.sql.connection  db_conn;

url = "jdbc:oracle:thin:@sun-123:1521:db1";
db_conn = DriverManager.getConnection(url, "scott", "tiger");
AQjmsFactory.unregisterConnectionFactory(db_conn, "topic_conn1");

Unregistering a Queue/Topic Connection Factory in LDAP Through LDAP

Figure 13-6 Unregistering a Queue/Topic Connection Factory in LDAP Through LDAP

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


See Also:

Purpose

Register a queue/topic connection factory in LDAP.

Usage Notes

unregisterConnectionFactory is a static method. To successfully unregister the connection factory, the hashtable passed to unregisterConnectionFactory must contain all the information to establish a valid connection to the LDAP server. Furthermore, the connection must have write access to the connection factory entries in the LDAP server (which requires the LDAP user to be either the database itself or be granted global_aq_user_role).

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsFactory.unregisterConnectionFactory.

Example

String               url;
Hashtable            env = new Hashtable(5, 0.75f);

/* the following statements set in hashtable env:
   * service provider package
   * the URL of the ldap server
   * the distinguished name of the database server
   * the authentication method (simple)
   * the LDAP user name
   * the LDAP user password

*/

env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://sun-456:389");
env.put("searchbase", "cn=db1,cn=Oraclecontext,cn=acme,cn=com");
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "cn=db1aqadmin,cn=acme,cn=com");
env.put(Context.SECURITY_CREDENTIALS, "welcome");
url = "jdbc:oracle:thin:@sun-123:1521:db1";
AQjmsFactory.unregisterConnectionFactory(env, "queue_conn1");

Getting a Queue Connection Factory with JDBC URL

Figure 13-7 Getting a Queue Connection Factory with JDBC Connection

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


See Also:

Purpose

Get a Queue Connection Factory with JDBC URL

Usage Notes

getQueueConnectionFactory is a static method.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsFactory.getQueueConnectionFactory

Example

 String      url          = "jdbc:oracle:oci8:internal/oracle"
 Properties  info         = new Properties();
 QueueConnectionFactory   qc_fact;

 info.put("internal_logon", "sysdba");
 qc_fact = AQjmsFactory.getQueueConnectionFactory(url, info);

Getting a Queue Connection Factory with JDBC Connection Parameters

Figure 13-8 Getting a Queue Connection Factory with JDBC Connection Parameters

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


See Also:

Purpose

Get a Queue Connection Factory with JDBC Connection Parameters

Usage Notes

getQueueConnectionFactory is a static method.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsFactory.getQueueConnectionFactory

Example

 String      host         = "dlsun";
 String      ora_sid      = "rdbms8i"
 String      driver       = "thin";
 int         port         = 5521;
 QueueConnectionFactory   qc_fact;

 qc_fact = AQjmsFactory.getQueueConnectionFactory(host, ora_sid, port, driver);

Getting a Topic Connection Factory with JDBC URL

Figure 13-9 Getting a Topic Connection Factory with JDBC URL

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


See Also:

Purpose

Get a Topic Connection Factory with a JDBC URL.

Usage Notes

getTopicConnectionFactory is a static method.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsFactory.getTopicConnectionFactory

Example

 String      url          = "jdbc:oracle:oci8:internal/oracle"
 Properties  info         = new Properties();
 TopicConnectionFactory   tc_fact;

 info.put("internal_logon", "sysdba");
 tc_fact = AQjmsFactory.getTopicConnectionFactory(url, info);

Getting a Topic Connection Factory with JDBC Connection Parameters

Figure 13-10 Getting a Topic Connection Factory with JDBC Connection Parameters

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


See Also:

Usage Note

getTopicConnectionFactory is a Static Method.

Purpose

Get a topic connection factory with JDBC connection parameters.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsFactory.getTopicConnectionFactory

Example

String      host         = "dlsun";
String      ora_sid      = "rdbms8i"
String      driver       = "thin";
int         port         = 5521;
TopicConnectionFactory   tc_fact;

tc_fact = AQjmsFactory.getTopicConnectionFactory(host, ora_sid, port, driver);

Getting a Queue/Topic Connection Factory in LDAP

Figure 13-11 Getting a Queue/Topic Connection Factory in LDAP

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


See Also:
  • Table 13-1 for a list of JMS administrative interface basic operations

Purpose

Get a queue/topic connection factory from LDAP.

Example

Hashtable              env = new Hashtable(5, 0.75f);
DirContext             ctx;
queueConnectionFactory qc_fact;

/* the following statements set in hashtable env:
   * service provider package
   * the URL of the ldap server
   * the distinguished name of the database server
   * the authentication method (simple)
   * the LDAP user name
   * the LDAP user password
*/
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://sun-456:389");
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "cn=db1aquser1,cn=acme,cn=com");
env.put(Context.SECURITY_CREDENTIALS, "welcome");

ctx = new InitialDirContext(env);
ctx = 
(DirContext)ctx.lookup("cn=OracleDBConnections,cn=db1,cn=Oraclecontext,cn=acme,c
n=com");
qc_fact = (queueConnectionFactory)ctx.lookup("cn=queue_conn1");

Getting a Queue/Topic in LDAP

Figure 13-12 Getting a Queue/Topic in LDAP

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


See Also:
  • Table 13-1 for a list of JMS administrative interface basic operations

Purpose

Get a queue/topic from LDAP.

Example

Hashtable              env = new Hashtable(5, 0.75f);
DirContext             ctx;
topic                  topic_1;

/* the following statements set in hashtable env:
   * service provider package
   * the URL of the ldap server
   * the distinguished name of the database server
   * the authentication method (simple)
   * the LDAP user name
   * the LDAP user password
*/
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://sun-456:389");
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "cn=db1aquser1,cn=acme,cn=com");
env.put(Context.SECURITY_CREDENTIALS, "welcome");

ctx = new InitialDirContext(env);
ctx = 
(DirContext)ctx.lookup("cn=OracleDBQueues,cn=db1,cn=Oraclecontext,cn=acme,cn=com
");
topic_1 = (topic)ctx.lookup("cn=topic_1");

Creating a Queue Table

Figure 13-13 Creating a Queue Table

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


See Also:

Purpose

Create a queue table.

Usage Notes

CLOB, BLOB, BFILE objects are valid attributes for an AQ object type load. However, only CLOB and BLOB can be propagated using AQ propagation in Oracle8i and after.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsSession.createQueueTable

Example

QueueSession              q_sess    = null;
AQQueueTable              q_table   = null;
AQQueueTableProperty      qt_prop   = null;

qt_prop = new AQQueueTableProperty("SYS.AQ$_JMS_BYTES_MESSAGE");
  q_table = ((AQjmsSession)q_sess).createQueueTable("boluser",
  "bol_ship_queue_table", qt_prop);

Creating a Queue Table [Specify Queue Table Property]

Figure 13-14 Creating a Queue Table [Specify Queue Table Property]

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


See Also:

Purpose

Specify queue table properties

Usage Notes

Not applicable.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.AQ, AQQueueTableProperty

Example

    QueueSession              q_sess    = null;
    AQQueueTable              q_table   = null;
    AQQueueTableProperty      qt_prop   = null;

    qt_prop = new AQQueueTableProperty("SYS.AQ$_JMS_BYTES_MESSAGE");
    q_table = ((AQjmsSession)q_sess).createQueueTable("boluser",
       "bol_ship_queue_table", qt_prop);

Getting a Queue Table

Figure 13-15 Getting Queue Table

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


See Also:

Purpose

Get a queue table.

Usage Notes

If the caller that opened the connection is not the owner of the queue table, the caller must have AQ enqueue/dequeue privileges on queues/topics in the queue table. Otherwise the queue-table will not be returned.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsSession.getQueueTable

Example

QueueSession              q_sess;
AQQueueTable              q_table;

 q_table = ((AQjmsSession)q_sess).getQueueTable("boluser",                                                        
"bol_ship_queue_table");

Specifying Destination Properties

Figure 13-16 Specifying Destination Properties

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


See Also:

Purpose

Specify destination properties.

Usage Notes

Not applicable.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsDestinationProperty

Example

No example is provided with this release.

Creating a Queue--Point-to-Point

Figure 13-17 Creating a Queue--Point-to-Point

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


See Also:

Purpose

Create a queue in a specified queue table.

Usage Notes

The queue table in which a queue is created has to be a single-consumer queue table.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsSession.createQueue

Example

QueueSession             q_sess;
AQQueueTable             q_table;
AqjmsDestinationProperty dest_prop;
Queue                    queue;

queue = ((AQjmsSession)q_sess).createQueue(q_table, "jms_q1", dest_prop);

Creating a Topic--Publish-Subscribe

Figure 13-18 Creating a Topic--Publish-Subscribe

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


See Also:

Purpose

Create a topic in the publish-subscribe model.

Usage Notes

Not applicable.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsSession.createTopic

Example

TopicSession             t_sess;
AQQueueTable             q_table;
AqjmsDestinationProperty dest_prop;
Topic                    topic;

topic = ((AQjmsSessa)t_sess).createTopic(q_table, "jms_t1", dest_prop);

Granting System Privileges

Figure 13-19 Granting System Privileges

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


See Also:

Purpose

Grant AQ system privileges to a user/roles.

Usage Notes

Initially only SYS and SYSTEM can use this procedure successfully.

The privileges are ENQUEUE_ANY, DEQUEUE_ANY and MANAGE_ANY.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsSession.grantSystemPrivilege

Example

TopicSession             t_sess;

((AQjmsSession)t_sess).grantSystemPrivilege("ENQUEUE_ANY", "scott", false);

Revoking System Privileges

Figure 13-20 Revoking System Privileges

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


See Also:

Purpose

Revoke AQ system privileges from user/roles.

Usage Notes

The privileges are ENQUEUE_ANY, DEQUEUE_ANY, and MANAGE_ANY.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsSession.revokeSystemPrivilege

Example

TopicSession             t_sess;

((AQjmsSession)t_sess).revokeSystemPrivilege("ENQUEUE_ANY", "scott");

Granting Topic Privileges--Publish-Subscribe

Figure 13-21 Granting Topic Privileges--Publish-Subscribe

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


See Also:

Purpose

Grant a topic privilege in the publish-subscribe model.

Usage Notes

The privileges are ENQUEUE, DEQUEUE and ALL. ALL means both. Initially only the queue table owner can use this procedure to grant privileges on the topic.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsDestination.grantTopicPrivilege

Example

TopicSession             t_sess;
Topic                    topic;

((AQjmsDestination)topic).grantTopicPrivilege(t_sess, "ENQUEUE", "scott", 
false);

Revoking Topic Privileges--Publish-Subscribe

Figure 13-22 Revoking Topic Privileges--Publish-Subscribe

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


See Also:

Purpose

Revoke a topic privilege in the publish-subscribe model

Usage Notes

The privileges are ENQUEUE, DEQUEUE, and ALL. ALL means both.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsDestination.revokeTopicPrivilege

Example

TopicSession             t_sess;
Topic                    topic;

((AQjmsDestination)topic).revokeTopicPrivilege(t_sess, "ENQUEUE", "scott");

Granting Queue Privileges--Point-to-Point

Figure 13-23 Granting Queue Privileges--Point-to-Point

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


See Also:

Purpose

Grant a queue privilege in the point-to-point model

Usage Notes

The privileges are ENQUEUE, DEQUEUE and ALL. ALL means both. Initially only the queue table owner can use this procedure to grant privileges on the queue.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsDestination.grantQueuePrivilege

Example

QueueSession             q_sess;
Queue                    queue;

((AQjmsDestination)queue).grantQueuePrivilege(q_sess, "ENQUEUE", "scott", 
false);

Revoking Queue Privileges--Point-to-Point

Figure 13-24 Revoking Queue Privileges--Point-to-Point

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


See Also:

Purpose

Revoke queue privilege in the point-to-point model

Usage Notes

The privileges are ENQUEUE, DEQUEUE and ALL. ALL means both. To revoke a privilege, the revoker must be the original grantor of the privilege. The privileges propagated through the GRANT option are revoked if the grantors privilege is also revoked.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsDestination.revokeQueuePrivilege

Example

QueueSession             q_sess;
Queue                    queue;

((AQjmsDestination)queue).revokeQueuePrivilege(q_sess, "ENQUEUE", "scott");

Starting a Destination

Figure 13-25 Starting a Destination

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


See Also:

Purpose

Start a destination.

Usage Notes

After creating a destination, the administrator must use the start method to enable the destination. If Enable Enqueue is set to TRUE, then the destination is enabled for enqueue. If Enable Enqueue is set to FALSE, then the destination is disabled for enqueue. Similarly, if Enable Dequeue is set to TRUE, then the destination is enabled for dequeue. If Enable Dequeue is set to FALSE, the destination is disabled for dequeue.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsDestination.start

Example

TopicSession t_sess;
QueueSession q_sess;
Topic        topic;
Queue        queue;

(AQjmsDestination)topic.start(t_sess, true, true);
(AQjmsDestination)queue.start(q_sess, true, true);

Stopping a Destination

Figure 13-26 Stopping a Destination

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


See Also:

Purpose

Stop a destination.

Usage Notes

If Disable Dequeue is set to TRUE, then the destination is disabled for dequeue. If Disable dequeue is set to FALSE, then the current setting is not altered. Similarly if Disable Enqueue set to TRUE, then the destination is disabled for enqueue. If Disable Enqueue is set to FALSE, then the current setting is not altered.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsDestination.stop

Example

TopicSession t_sess;
Topic        topic;

((AQjmsDestination)topic).stop(t_sess, true, false);

Altering a Destination

Figure 13-27 Altering a Destination

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


See Also:

Purpose

Alter a destination.

Usage Notes

Not applicable.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsDestination.alter

Example

QueueSession q_sess;
Queue        queue;
TopicSession t_sess;
Topic        topic;

AQjmsDestionationProperty dest_prop1, dest_prop2;

((AQjmsDestination)queue).alter(dest_prop1);
((AQjmsDestination)topic).alter(dest_prop2);

Dropping a Destination

Figure 13-28 Dropping a Destination

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


See Also:

Purpose

Drop a destination.

Usage Notes

Not applicable.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsDestination.drop

Example

QueueSession q_sess;
Queue        queue;
TopicSession t_sess;
Topic        topic;

((AQjmsDestionation)queue).drop(q_sess);
((AQjmsDestionation)topic).drop(t_sess);

Scheduling a Propagation

Figure 13-29 Scheduling a Propagation

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


See Also:

Purpose

Schedule a Propagation

Usage Notes

Messages can be propagated to other topics in the same database by specifying a NULL destination. If the 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.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsDestination.schedulePropagation

Example

TopicSession t_sess;
Topic        topic;

((AQjmsDestination)topic).schedulePropagation(t_sess, null, null, null, null, 
new Double(0));

Enabling a Propagation Schedule

Figure 13-30 Enabling a Propagation Schedule

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


See Also:

Purpose

Enable a Propagation Schedule

Usage Notes

NULL destination indicates that the propagation is to the local database.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsDestination.enablePropagationSchedule

Example

TopicSession             t_sess;
Topic                    topic;

 ((AQjmsDestination)topic).enablePropagationSchedule(t_sess, "dbs1");

Altering a Propagation Schedule

Figure 13-31 Altering a Propagation Schedule

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


See Also:

Purpose

Alter a propagation schedule.

Usage Notes

NULL destination indicates that the propagation is to the local database

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsDestination.alterPropagationSchedule

Example

TopicSession             t_sess;
Topic                    topic;

 ((AQjmsDestination)topic).alterPropagationSchedule(t_sess, null, 30, null, new 
Double(30));

Disabling a Propagation Schedule

Figure 13-32 Disabling a Propagation Schedule

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


See Also:

Purpose

Disable a propagation schedule.

Usage Notes

NULL destination indicates that the propagation is to the local database

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsDestination.disablePropagationSchedule

Example

TopicSession             t_sess;
Topic                    topic;

 ((AQjmsDestination)topic).disablePropagationSchedule(t_sess, "dbs1");

Unscheduling a Propagation

Figure 13-33 Unscheduling a Propagation

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


See Also:

Purpose

Unschedule a propagation.

Usage Notes

Unschedule a previously scheduled propagation.

Syntax

See Java (JDBC): Oracle9i Supplied Java Packages Reference oracle.jms, AQjmsDestination.unschedulePropagation

Example

TopicSession   t_sess;
Topic          topic;

((AQjmsDestination)topic).unschedulePropagation(t_sess, "dbs1");


Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 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