Problem with DBMS_ALERT
From: Oliver Gassner <PrismaSE_at_csi.com>
Date: Wed, 31 Mar 1999 12:09:32 +0200
Message-ID: <OESay51e#GA.265_at_nih2naad.prod2.compuserve.com>
Hey ,
we 'register' the alerter Name in one Function. In another Function we call 'waitone' for the registered Name. In a third Function we remove the registered Name. All Functions will be called by one Session. We kill the Session, so that the call of 'remove' isn't possible. Than we start the 'register' and 'waitone' Function again, the 'waitone' will not receive a generated Signal until a Timeout occurs and another call of 'waitone' happens.
Telefax ........: 04961 / 67145
Aenderungsliste.:
Datum Wer Was
25.03.1999 RLA Erstellung
******/
Date: Wed, 31 Mar 1999 12:09:32 +0200
Message-ID: <OESay51e#GA.265_at_nih2naad.prod2.compuserve.com>
Hey ,
we 'register' the alerter Name in one Function. In another Function we call 'waitone' for the registered Name. In a third Function we remove the registered Name. All Functions will be called by one Session. We kill the Session, so that the call of 'remove' isn't possible. Than we start the 'register' and 'waitone' Function again, the 'waitone' will not receive a generated Signal until a Timeout occurs and another call of 'waitone' happens.
Thanks for any reply!!
Olli
function UST_MANAGER_INIT
return number
is
/*****
Thema ..........: LVS UST Management Beschreibung ...: Setzt den Prozesseintrag des UST Managers auf aktiv Inhalt .........: Parameter ......: Erstellt am ....: 25.03.1999 Letzte Änderung.: 25.03.1999 Erstellt durch .: PRISMA Software Engineering GmbH Ersteller ......: Dipl.-Ing. (FH) Rolf Latza Strasse ........: Hauptkanal links 100 Ort ............: 26871 Papenburg Telefon ........: 04961 / 916191
Telefax ........: 04961 / 67145
Aenderungsliste.:
Datum Wer Was
25.03.1999 RLA Erstellung
******/
- Typendeklaration
tyAktion SYSTEM_ERRORS.SE_AKTION%type;
- Variablendeklarationen
numRc number; strParaValue varchar2(10); strTyp varchar2(1); begin tyAktion := 'UST_MANAGER_INIT starten'; numRc := LVS_SYSTEM.PROCESS_CONTROL(LVS_SYSTEM.PRC_ID_UST_MANAGER,'', LVS_SYSTEM.PRC_START); if numRc = 0 then
- Pruefe Systemparameter auf Timeoutangabe
strParaValue := ltrim(to_char(LVS_UST.UST_MANAGER_TIMEOUT)); strTyp := LVS_SYSTEM.GET_SYSTEM_PARAMATER(8,strParaValue,LVS_SYSTEM.LVS_TRUE); if strTyp = 'N' then LVS_UST.UST_MANAGER_TIMEOUT := to_number(strParaValue); end if; dbms_alert.register('TELEGRAMM_ALERT'); end if; return numRc;
- Errorhandler UST_MANAGER_INIT
exception when OTHERS then
- Errorhandler UST_MANAGER_INIT
- set errorcode and errortext
numRc := sqlcode; LVS_ERROR.TRACE('UST_MANAGER_INIT',sqlcode,sqlerrm,tyAktion); return numRc; end UST_MANAGER_INIT; --========================================================================
- UST Manager stoppen (Prozesseintrag auf gestoppt setzen)
--========================================================================
function UST_MANAGER_STOPP return number is /***** Thema ..........: LVS UST Management Beschreibung ...: Setzt den Prozesseintrag des UST Managers auf inaktiv Inhalt .........: Parameter ......: Erstellt am ....: 25.03.1999 Letzte Änderung.: 25.03.1999 Erstellt durch .: PRISMA Software Engineering GmbH Ersteller ......: Dipl.-Ing. (FH) Rolf Latza Strasse ........: Hauptkanal links 100 Ort ............: 26871 Papenburg Telefon ........: 04961 / 916191 Telefax ........: 04961 / 67145 Aenderungsliste.:
Datum Wer Was 25.03.1999 RLA Erstellung ******/
- UST Manager stoppen (Prozesseintrag auf gestoppt setzen)
--========================================================================
- Pruefe Systemparameter auf Timeoutangabe
- Typendeklaration
tyAktion SYSTEM_ERRORS.SE_AKTION%type;
- Variablendeklarationen
numRc number; begin tyAktion := 'UST_MANAGER_STOPP anhalten'; numRc := LVS_SYSTEM.PROCESS_CONTROL(LVS_SYSTEM.PRC_ID_UST_MANAGER,'', LVS_SYSTEM.PRC_STOPP); if numRc = 0 then dbms_alert.remove('TELEGRAMM_ALERT'); end if; return numRc;
- Errorhandler UST_MANAGER_STOPP
exception when OTHERS then
- set errorcode and errortext
numRc := sqlcode; LVS_ERROR.TRACE('UST_MANAGER_STOPP',sqlcode,sqlerrm,tyAktion); return numRc; end UST_MANAGER_STOPP; --========================================================================
- set errorcode and errortext
- UST Manager
--========================================================================
function UST_MANAGER return number is /***** Thema ..........: LVS UST Management Beschreibung ...: UST Manager Inhalt .........: Parameter ......: Erstellt am ....: 25.03.1999 Letzte Änderung.: 25.03.1999 Erstellt durch .: PRISMA Software Engineering GmbH Ersteller ......: Dipl.-Ing. (FH) Rolf Latza Strasse ........: Hauptkalnal links 100 Ort ............: 26871 Papenburg Telefon ........: 04961 / 916191 Telefax ........: 04961 / 67145 Aenderungsliste.:
Datum Wer Was 25.03.1999 RLA Erstellung ******/
- Errorhandler UST_MANAGER_STOPP
- Typendeklaration
tyAktion SYSTEM_ERRORS.SE_AKTION%type; tyFA_PK FAHRTEN.FA_PK%type; tyTEL_PK TELEGRAMME.TEL_PK%type;
- Variablendeklarationen
numRc number; strMessage varchar2(20); numStatus number(1); begin tyAktion := 'UST Manager starten'; numRc := LVS_SYSTEM.PROCESS_CONTROL(LVS_SYSTEM.PRC_ID_UST_MANAGER,'', LVS_SYSTEM.PRC_CHECK); if numRc != 3 then numRc := 150; return numRc; else numRc := 0; end if;
- Pruefe Telegramme
dbms_alert.waitone('TELEGRAMM_ALERT', strMessage, numStatus, LVS_UST.UST_MANAGER_TIMEOUT); if numStatus = 0 then tyTEL_PK := to_number(strMessage); numRc := LVS_UST.RCV_TEL_VERARBEITUNG(tyTEL_PK); --goto NaechsterAuftrag; else if numStatus = 1 then numRc := 151; else numRc := 152; end if; end if; return numRc;
- Errorhandler UST_MANAGER
exception when OTHERS then
- set errorcode and errortext
numRc := sqlcode; LVS_ERROR.TRACE('UST_MANAGER',sqlcode,sqlerrm,tyAktion); return numRc; end UST_MANAGER;
- set errorcode and errortext
- Errorhandler UST_MANAGER