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 />

CREATE USER BOLADM IDENTIFIED BY BOLADM; GRANT CONNECT, RESOURCE, aq_<br />

administrator_role TO BOLADM;<br />

((AQjmsSession)t_sess).grantSystemPrivilege("ENQUEUE_ANY", "BOLADM", false);<br />

((AQjmsSession)t_sess).grantSystemPrivilege("DEQUEUE_ANY", "BOLADM", false)<br />

;where t_sess is the session object.<br />

In the application, AQ propagators populate messages from the OE (Order Entry)<br />

schema to WS (Western Sales), ES (Eastern Sales) and OS (Worldwide Sales)<br />

schemas. The WS, ES and OS schemas in turn populate messages to CB (Customer<br />

Billing) and CS (Customer Service) schemas. Hence the OE, WS, ES and OS schemas<br />

all host queues that serve as the source queues for the propagators.<br />

When messages arrive at the destination queues, sessions based on the source<br />

queue schema name are used for enqueuing the newly arrived messages into the<br />

destination queues. This means that you need to grant schemas of the source<br />

queues enqueue privileges to the destination queues.<br />

To simplify administration, all schemas that host a source queue in the<br />

BooksOnLine application are granted the ENQUEUE_ANY system privilege.<br />

((AQjmsSession)t_sess).grantSystemPrivilege("ENQUEUE_ANY", "OE", false);<br />

((AQjmsSession)t_sess).grantSystemPrivilege("ENQUEUE_ANY", "WS", false);<br />

((AQjmsSession)t_sess).grantSystemPrivilege("ENQUEUE_ANY", "ES", false);<br />

((AQjmsSession)t_sess).grantSystemPrivilege("ENQUEUE_ANY", "OS", false);<br />

where t_sess is the session object<br />

To propagate to a remote destination queue, the login user (specified in the<br />

database link in the address field of the agent structure) should either be granted<br />

the ’ENQUEUE ANY’ privilege, or be granted the rights to enqueue to the<br />

destination queue. However, you do not need to grant any explicit privileges if the<br />

login user in the database link also owns the queue tables at the destination.<br />

Destination-Level Access Control in JMS<br />

<strong>Oracle</strong>8i supports queue/topic level access control for enqueue and dequeue<br />

operations. This feature allows the application designer to protect queues/topics<br />

created in one schema from applications running in other schemas. You need to<br />

grant only minimal access privileges to the applications that run outside the<br />

queue/topic’s schema. The supported access privileges on a queue/topic are<br />

ENQUEUE, DEQUEUE and ALL. For more information see "<strong>Oracle</strong> Enterprise Manager<br />

Support" in Chapter 4, "Managing AQ".<br />

Creating Applications Using JMS 12-17

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!