We are using JMS to process messages in a Java 1.8 SE environment, using an underlying Oracle (12) Advanced Queue. On can start a queue, specifying whether enqueueing and dequeuing are allowed using:
(AQjmsDestination)queue.start(q_sess, true, true);
The second argument indicates whether enqueueing is enabled, while the third argument indicates whether dequeueing is enabled. However, if we are given an AQjmsDestination
object, I don't see how to determine whether enqueuing or dequeueing are enabled from within Java. Does anybody know?
I couldn't find a way to make a simple JMS call to determine whether or not enqueueing and dequeueing are allowed. You can get that information from the database, using a query like:
Select name, enqueue_enabled, dequeue_enabled from user_queues
Where queue_type='NORMAL_QUEUE' and name = 'my_queue_name';
So, for now, I am wrapping that query up in JDBC to get the information I need.