Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
OTN Speaker Bureau
Get Started Guide
Join the world’s largest interactive community dedicated to Oracle technologies.
Learn from thousands of community experts
Get answers to your technical questions
Share your knowledge with peers
Please enter a title.
You can not post a blank message. Please type your message and try again.
Oracle Database + Options
This discussion is archived
on Sep 4, 2012 1:35 PM by 628404
Procedure Function to dequeue a message and return cursor
Jan 16, 2012 2:56 PM
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
I have the same question
Show 0 Likes
This content has been marked as final.
Show 1 reply
Re: Procedure Function to dequeue a message and return cursor
Sep 4, 2012 1:35 PM
in response to