Endless stored procedure leaves an open session [message #60135] |
Sun, 18 January 2004 06:55 |
YuliaG
Messages: 8 Registered: June 2003
|
Junior Member |
|
|
Hi Everyone,
Please, help me resolving the following problem:
I have a blocking stored procedure that runs on the database (waits for new entries on Advanced Queue) and leaves an opened session even if the owner thread exits.Please, tell me how I can configure my database to return from this stored procedure if no message arrives (DBMS_AQ.ENQUEUE action) in a specified time.
Thanks a lot for your reply,
Yulia
|
|
|
Re: Endless stored procedure leaves an open session [message #60144 is a reply to message #60135] |
Mon, 19 January 2004 01:29 |
Frank Naude
Messages: 4587 Registered: April 1998
|
Senior Member |
|
|
Hi,
"Applications can optionally specify a timeout of zero or more seconds to indicate the time that AQ must wait for the arrival of a message. The default is to wait forever until a message arrives in the queue."
Source: Chapter 8 of the "Oracle9i Application Developer's Guide - Advanced Queuing"
This chapter continues with examples for PL/SQL, Java and Visual Basic...
Best regards.
Frank
|
|
|
Re: Endless stored procedure leaves an open session [message #60147 is a reply to message #60144] |
Mon, 19 January 2004 02:54 |
YuliaG
Messages: 8 Registered: June 2003
|
Junior Member |
|
|
Hi Frank,
Thank you very much for your reply.
I tried to use this solution (dequeue_options.wait := X;), but it decreases the performance.
Actually, I'm ending the process while it is waiting in the AQ and the db session remains open for very long times. I've seen that agains some dbs it stays open only for a very short time. Do you know what configurations there are that can influence this (the time orphaned sessions stay open ).
Thanks a lot,
Yulia
|
|
|
|