views:

1124

answers:

2

I have an application that uses JMS op top of Oracle advanced queuing. I would like to do a query on the queue table that shows the content of the message (which in my case is XML). So when I do a 'select user_data from [queue_table]' I get 'AQ SYS.AQ$_JMS_TEXT_MESSAGE' as a response.

Is there a function so that the contents of this message can be shown? Something like 'select FUNCTION(user_data) from [queue_table]' or something?

I googled, scanned numerous Oracle articles about queuing, but I cannot find this thing. I suspect there is a simple way to do this, but I cannot find it.

+3  A: 

Hi Bruno,

I struggled with this one as well. I've written an answer here: http://rwijk.blogspot.com/2009/02/whats-in-my-jms-queue.html .

Regards, Rob.

Rob van Wijk
"select queue.user_data.text_vc from [queue_table] queue"I added the answer here, so I can promote the answer as the solution to the problem, and I want the answer to be complete.
Bruno Ranschaert
I have found that larger text are stored in queue.user_data.text_lob instead of text_vc
Michał Niklas
A: 

So I suppose it should be:

select queue.user_data.text_vc from [queue_table] queue
Bruno Ranschaert
Exactly. You should use an alias or the table_name itself in front of the user_data.text_vc. Otherwise it starts looking for a package user_data containing a function called text_vc, resulting in the error message ORA-00904: "USER_DATA"."TEXT_VC": invalid identifier
Rob van Wijk