Oracle9i Application Developer's Guide - Advanced Queuing Release 1 (9.0.1) Part Number A88890-02 |
|
JMS Operational Interface: Basic Operations (Point-to-Point), 23 of 24
Create a queue receiver for queues of Oracle object type (ADT) messages.
The CustomDatum factory for a particular java class that maps to the SQL ADT payload can be obtained via the getFactory static method.
For queues containing AdtMessages
the selector for QueueReceiver can be a SQL expression on the message payload contents or messageID or priority or correlationID
.
msgid = '23434556566767676'
Note: in this case message IDs must NOT be prefixed with 'ID:'
priority < 3 AND corrid = 'Fiction'
tab.user_data.color = 'GREEN' AND tab.user_data.price < 30000
Assume the Queue - test_queue has payload of type SCOTT.EMPLOYEE and the java class that is generated by Jpublisher for this ADT is called Employee. The Employee class implements the CustomDatum interface. The CustomDatumFactory for this class can be obtained by using the Employee.getFactory() method.
/* Create a receiver for a Queue with Adt messages of type EMPLOYEE*/ QueueSession jms_session QueueReceiver receiver; Queue test_queue; browser = ((AQjmsSession)jms_session).createReceiver(test_queue, "JMSCorrelationID = 'MANAGER', Employee.getFactory());
|
![]() Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|