Will all processes signal one named alert or a process specific alert? If it is one alert then keep counting as you receive, if they are individually named alerts, keep a local pl/sql table and mark as you receive them. When you have alerts, dbms_lock for the same purpose is like riding a bike while it is being towed.
Raj
--------------------------------------------------------------------------------
Rajendra dot Jamadagni at nospamespn dot com
All Views expressed in this email are strictly personal.
QOTD: Any clod can have facts, having an opinion is an art !
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 15, 2003 1:44 PM
To: Multiple recipients of list ORACLE-L
Subject: using dbms_alert to manage multiple processes
I have a coordinator package that is going to run alot of long running batch processes through dbms_job. Could be as many as 300 of them. I know to set my job_queue_processes = 36.
however, I want to 'wait' until all of these are done. My concern is with concurrency.
here is pseudo code:
max number := 0;
counter number := 0;
loop
dbms_job.submit....
dbms_alert.register...
max := max + 1;
exit when finished submitted
for i in 1.. max LOOP
dbms_alert.waitany(... stuff...)
end loop;
my concern is in the split second while my coordinate is awake, that another dbms_alert could get issued and Ill never reach my max counter in the loop.
do I need to use dbms_lock to serialize this? Its not that big of a deal, Im just hoping that oracle serializes it for me.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: <[EMAIL PROTECTED]
INET: [EMAIL PROTECTED]
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
********************************************************************This e-mail message is confidential, intended only for the named recipient(s) above and may contain information that is privileged, attorney work product or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 and delete this e-mail message from your computer, Thank you.*********************************************************************2