Oracle Community Directory
Oracle Community FAQ
My Oracle Support Community (MOSC)
Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
OTN Speaker Bureau
Oracle Database + Options
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
: Sep 4, 2012 8:35 AM by
Procedure Function to dequeue a message and return cursor
Jan 16, 2012 8:56 AM
We are looking for ways to dequeue a message from an oracle queue and pass it to the java code.
Namely we would like to create a procedure/function to dequeue a message which can be called by the java code for further processing.
So far we have the following working example, but it uses DBMS_OUTPUT.PUT_LINE to display values. But the target is to pass it to java...
Our DB - 11gR2
create or replace
dequeue_options.navigation := DBMS_AQ.FIRST_MESSAGE;
queue_name => 'ORDERS_Q',
dequeue_options => dequeue_options,
message_properties => message_properties,
payload => message,
msgid => message_handle);
DBMS_OUTPUT.PUT_LINE('STATUS: '|| MESSAGE.CORDYS_STATUS);
DBMS_OUTPUT.PUT_LINE('CUSTOMERNUMBER: '|| MESSAGE.CUSTOMERNUMBER);
DBMS_OUTPUT.PUT_LINE('EINDDATUM: '|| MESSAGE.EINDDATUM);
DBMS_OUTPUT.PUT_LINE('ERRORCODE: '|| MESSAGE.ERRORCODE);
DBMS_OUTPUT.PUT_LINE('EXTRA1: '|| MESSAGE.EXTRA1);
DBMS_OUTPUT.PUT_LINE('EXTRA2: '|| MESSAGE.EXTRA2);
DBMS_OUTPUT.PUT_LINE('EXTRA3: '|| MESSAGE.EXTRA3);
DBMS_OUTPUT.PUT_LINE('EXTRA4: '|| MESSAGE.EXTRA4);
DBMS_OUTPUT.PUT_LINE('EXTRA5: '|| MESSAGE.EXTRA5);
In a result we get the following on the screen:
EINDDATUM: 20-DEC-11 12:00:00
Question is how to sent result into a variable/cursor... whatever which might be read by the java code.
Any help would be much appreciated.
Edited by: eMarcel on Jan 16, 2012 3:56 PM
This content has been marked as final.
Show 1 reply
Re: Procedure Function to dequeue a message and return cursor
Sep 4, 2012 8:35 AM
in response to