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.

’AQ.MSG_MAP1’);<br />

/* Alter the subscriber*/<br />

EXECUTE DBMS_AQADM.ALTER_SUBSCRIBER<br />

(’aq.msg_queue’,<br />

aq$_agent (’subscriber1’,<br />

’aq2.msg_queue2@london’,<br />

null),<br />

’AQ.MSG.MAP2’);<br />

Java (JDBC): Altering a Subscriber<br />

/* Alter the rule for a subscriber */<br />

public static void example(AQSession aq_sess) throws AQException<br />

{<br />

AQQueue queue;<br />

AQAgent agent1;<br />

AQAgent agent2;<br />

}<br />

/* Get the queue object */<br />

queue = aq_sess.getQueue("AQ", "multi_queue");<br />

/* add a subscriber */<br />

agent1 = new AQAgent("subscriber1", "aq2.msg_queue2@london");<br />

queue.alterSubscriber(agent1, "priority=1");<br />

Altering a Subscriber<br />

Administrative Interface 9-67

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

Saved successfully!

Ooh no, something went wrong!