Reputation: 2058
I want to write the size of the AQ Error Queue to my WebGUI.
I, of course, can figure out the size of the normal queue by creating a connection with the connection factory. However, this connection is not intended get hints about the error queue, isn't?
If there is a chance to abuse this established session (connection to regular queue) to grab the total size of the error queue, how would I do that? I prefere to use an EJB.
I rather would go the other way around and use the connection factory (session).
Thanks
Upvotes: 1
Views: 2359
Reputation: 2058
If you don't have DB-read access, and are limited to consume messages only, to an (Oracle Advanced) queue, you cold:
This way you don't consume the messages but are able to count it.
I WANT TO MAKE THIS CLEAR: THIS IS A WORK AROUND! If you have not been granted read access to the advanced queuing database! Also this approach does not work out well, if the queue is stacking-up or is consumed quickly. The size-number is timely less accurate than when invoking SELECT COUNT(*) FROM MYADVANCEDQUEUE
.
I certainly DONT recommend this if you have a straight-forward solution.
Upvotes: 0
Reputation: 4141
You may (if you can) do a regular select
on the exception queue. For an exception queue there's always a regular table in your DB.
For info on AQ's exception queues please refer to the Oracle AQ documentation.
Upvotes: 1