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.

General Features of JMS<br />

((AQjmsDestination)topic).schedulePropagation(t_sess, "dba", null,<br />

null, null, null);<br />

/*<br />

some processing done here<br />

*/<br />

/* Unschedule propagation */<br />

((AQjmsDestination)topic).unschedulePropagation(t_sess, "dba");<br />

/* stop the topic */<br />

((AQjmsDestination)topic).stop(t_sess, true, true, true);<br />

/* drop topic */<br />

((AQjmsDestination)topic).drop(t_sess);<br />

/* drop queue table */<br />

q_table.drop(true);<br />

/* close session */<br />

t_sess.close();<br />

/* close connection */<br />

t_conn.close();<br />

}<br />

catch(Exception ex)<br />

{<br />

System.out.println("Exception: " + ex);<br />

}<br />

}<br />

System-Level Access Control in JMS<br />

<strong>Oracle</strong>8i supports system-level access control for all queuing operations. This<br />

feature allows an application designer or DBA to create users as queue<br />

administrators. A queue/topic administrator can invoke all JMS interface (both<br />

administration and operation) on any queue in the database. This simplifies the<br />

administrative work since all administrative scripts for the queues in a database can<br />

be managed under one schema. For more information, see "<strong>Oracle</strong> Enterprise<br />

Manager Support" on page 4-8.<br />

Example Scenario and Code<br />

In the BooksOnLine (BOL) application, the DBA creates BOLADM, the BooksOnLine<br />

Administrator account, as the queue administrator of the database. This allows<br />

BOLADM to create, drop, manage, and monitor any queues in the database.If you<br />

decide to create PL/SQL packages in the BOLADM schema that can be used by any<br />

applications to enqueue or dequeue, then you should also grant BOLADM the<br />

ENQUEUE_ANY and DEQUEUE_ANY system privilege.<br />

12-16 <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!