DBA Data[Home] [Help]

OWAPUB.DEBUG_CARTX dependencies on DEBUG_CARTX

Line 1: PACKAGE BODY DEBUG_CARTX as

1: PACKAGE BODY DEBUG_CARTX as
2:
3: -- ***************************************************************************
4: -- Copyright (c) 1991, 1998 by Oracle Corporation. All Rights Reserved.
5: --

Line 7: -- DEBUG_CARTX Package body

3: -- ***************************************************************************
4: -- Copyright (c) 1991, 1998 by Oracle Corporation. All Rights Reserved.
5: --
6: -- NAME
7: -- DEBUG_CARTX Package body
8: -- DESCRIPTION
9: -- This package implements PL/SQL cartridge debugging using OPB.
10: --
11: -- NOTES

Line 24: DEBUG_CARTX_BYE constant varchar2(20) := 'DEBUG_CARTX_BYE';

20: -- jmojnida 10/26/98 Created
21: --
22: -- ***************************************************************************
23:
24: DEBUG_CARTX_BYE constant varchar2(20) := 'DEBUG_CARTX_BYE';
25: DEBUG_CARTX_RES_OVER constant integer := -100;
26:
27: procedure insertmessage(msg varchar2) is
28: begin

Line 25: DEBUG_CARTX_RES_OVER constant integer := -100;

21: --
22: -- ***************************************************************************
23:
24: DEBUG_CARTX_BYE constant varchar2(20) := 'DEBUG_CARTX_BYE';
25: DEBUG_CARTX_RES_OVER constant integer := -100;
26:
27: procedure insertmessage(msg varchar2) is
28: begin
29: -- delete from scott.output;

Line 117: if (stopflag = DEBUG_CARTX_ERR_CRTPROC) then

113:
114: htp.htmlopen;
115: htp.headopen;
116:
117: if (stopflag = DEBUG_CARTX_ERR_CRTPROC) then
118: htp.title('Cartridge Debug Error');
119: htp.headclose;
120: htp.bodyopen;
121: htp.bold('Error in getting proper debug information.' || htf.paragraph);

Line 123: elsif (stopflag = DEBUG_CARTX_ABORT) then

119: htp.headclose;
120: htp.bodyopen;
121: htp.bold('Error in getting proper debug information.' || htf.paragraph);
122: htp.print('Please recompile the procedure and try again.');
123: elsif (stopflag = DEBUG_CARTX_ABORT) then
124: htp.title('Debug process aborted by the user');
125: htp.headclose;
126: htp.bodyopen;
127: htp.bold('Debug process was aborted by the user.' || htf.paragraph);

Line 128: elsif (stopflag = DEBUG_CARTX_SUSPEND) then

124: htp.title('Debug process aborted by the user');
125: htp.headclose;
126: htp.bodyopen;
127: htp.bold('Debug process was aborted by the user.' || htf.paragraph);
128: elsif (stopflag = DEBUG_CARTX_SUSPEND) then
129: htp.title('Debug process suspeneded');
130: htp.headclose;
131: htp.bodyopen;
132: htp.bold('Debug process was suspended abruptly.' || htf.paragraph);

Line 133: elsif (stopflag = DEBUG_CARTX_ERR_INIT) then

129: htp.title('Debug process suspeneded');
130: htp.headclose;
131: htp.bodyopen;
132: htp.bold('Debug process was suspended abruptly.' || htf.paragraph);
133: elsif (stopflag = DEBUG_CARTX_ERR_INIT) then
134: htp.title('Cartridge Debug Error');
135: htp.headclose;
136: htp.bodyopen;
137: htp.bold('An error occurred while initilizing the CGI environment.'

Line 139: elsif (stopflag = DEBUG_CARTX_ERR_SNDRES) then

135: htp.headclose;
136: htp.bodyopen;
137: htp.bold('An error occurred while initilizing the CGI environment.'
138: || htf.paragraph);
139: elsif (stopflag = DEBUG_CARTX_ERR_SNDRES) then
140: htp.title('Cartridge Debug Error');
141: htp.headclose;
142: htp.bodyopen;
143: htp.bold('An error occurred while accessing the result.'

Line 145: elsif (stopflag = DEBUG_CARTX_ERR_RDSRC) then

141: htp.headclose;
142: htp.bodyopen;
143: htp.bold('An error occurred while accessing the result.'
144: || htf.paragraph);
145: elsif (stopflag = DEBUG_CARTX_ERR_RDSRC) then
146: htp.title('Cartridge Debug Error');
147: htp.headclose;
148: htp.bodyopen;
149: htp.bold('An error occurred while getting the command information.'

Line 151: elsif (stopflag = DEBUG_CARTX_ERR) then

147: htp.headclose;
148: htp.bodyopen;
149: htp.bold('An error occurred while getting the command information.'
150: || htf.paragraph);
151: elsif (stopflag = DEBUG_CARTX_ERR) then
152: htp.title('Cartridge Debug Error');
153: htp.headclose;
154: htp.bodyopen;
155: htp.bold('A generic error occurred.' || htf.paragraph);

Line 157: elsif (stopflag = DEBUG_CARTX_ERR_PROC_EXISTS) then

153: htp.headclose;
154: htp.bodyopen;
155: htp.bold('A generic error occurred.' || htf.paragraph);
156: htp.print('Please start the debug session afresh.');
157: elsif (stopflag = DEBUG_CARTX_ERR_PROC_EXISTS) then
158: htp.title('Cartridge Debug Error');
159: htp.headclose;
160: htp.bodyopen;
161: htp.bold('Could not create a stub with name DE_' || SessID

Line 170: --raise "PDE_QUIT_DEBUG_CARTX";

166:
167: htp.print(htf.paragraph);
168: htp.bodyclose;
169: htp.htmlclose;
170: --raise "PDE_QUIT_DEBUG_CARTX";
171: end;
172:
173:
174: PROCEDURE getInternalDebugSession(SessionId out varchar2) IS

Line 329: sendAck(SessId, DEBUG_CARTX_QUIT, status);

325: htp.headclose;
326: htp.bodyopen;
327:
328: --Send a 'bye' message to all waiting processes
329: sendAck(SessId, DEBUG_CARTX_QUIT, status);
330: sendAck(SessId || 'Res', DEBUG_CARTX_QUIT, status);
331:
332: --Now clean the pipes.
333: sys.dbms_pipe.purge(SessID);

Line 330: sendAck(SessId || 'Res', DEBUG_CARTX_QUIT, status);

326: htp.bodyopen;
327:
328: --Send a 'bye' message to all waiting processes
329: sendAck(SessId, DEBUG_CARTX_QUIT, status);
330: sendAck(SessId || 'Res', DEBUG_CARTX_QUIT, status);
331:
332: --Now clean the pipes.
333: sys.dbms_pipe.purge(SessID);
334: sys.dbms_pipe.purge(SessID || 'Res');

Line 365: sendAck(SessionId, DEBUG_CARTX_QUIT, status);

361: htp.bodyopen;
362:
363: getInternalDebugSession(SessionId);
364: --Send a 'bye' message to all waiting processes
365: sendAck(SessionId, DEBUG_CARTX_QUIT, status);
366: sendAck(SessionId || 'Res', DEBUG_CARTX_QUIT, status);
367: --Now clean the pipes.
368: sys.dbms_pipe.purge(SessionID);
369: sys.dbms_pipe.purge(SessionID || 'Res');

Line 366: sendAck(SessionId || 'Res', DEBUG_CARTX_QUIT, status);

362:
363: getInternalDebugSession(SessionId);
364: --Send a 'bye' message to all waiting processes
365: sendAck(SessionId, DEBUG_CARTX_QUIT, status);
366: sendAck(SessionId || 'Res', DEBUG_CARTX_QUIT, status);
367: --Now clean the pipes.
368: sys.dbms_pipe.purge(SessionID);
369: sys.dbms_pipe.purge(SessionID || 'Res');
370: status := sys.dbms_pipe.remove_pipe(SessionID);

Line 427: if (ack < DEBUG_CARTX_SUCCESS) then

423: END LOOP;
424: status := sys.dbms_pipe.Send_Message(PipeName, 3600);
425: ack := waitForAck(resPipeName, res);
426:
427: if (ack < DEBUG_CARTX_SUCCESS) then
428: getDebugSessionId(SessId);
429: handleAborts(ack, Sessid);
430: cleanup_pipes(PipeName);
431: raise PDE_QUIT_DEBUG_CARTX;

Line 431: raise PDE_QUIT_DEBUG_CARTX;

427: if (ack < DEBUG_CARTX_SUCCESS) then
428: getDebugSessionId(SessId);
429: handleAborts(ack, Sessid);
430: cleanup_pipes(PipeName);
431: raise PDE_QUIT_DEBUG_CARTX;
432: end if;
433: else
434: htp.htmlopen;
435: htp.headopen;

Line 463: if (ack < DEBUG_CARTX_SUCCESS) then

459: sys.dbms_pipe.Pack_Message(procname);
460: status := sys.dbms_pipe.Send_Message(pipeName, 3600);
461: ack := waitForAck(resPipeName, res);
462:
463: if (ack < DEBUG_CARTX_SUCCESS) then
464: getDebugSessionId(SessId);
465: handleAborts(ack, Sessid);
466: cleanup_pipes(pipeName);
467: raise PDE_QUIT_DEBUG_CARTX;

Line 467: raise PDE_QUIT_DEBUG_CARTX;

463: if (ack < DEBUG_CARTX_SUCCESS) then
464: getDebugSessionId(SessId);
465: handleAborts(ack, Sessid);
466: cleanup_pipes(pipeName);
467: raise PDE_QUIT_DEBUG_CARTX;
468: end if;
469: end if;
470: end;
471:

Line 486: if (ack < DEBUG_CARTX_SUCCESS) then

482: sys.dbms_pipe.Pack_Message(source);
483: status := sys.dbms_pipe.Send_Message(PipeName, 3600);
484: ack := waitForAck(PipeName || 'Res', res);
485:
486: if (ack < DEBUG_CARTX_SUCCESS) then
487: getDebugSessionId(SessId);
488: handleAborts(ack, Sessid);
489: cleanup_pipes(PipeName);
490: raise PDE_QUIT_DEBUG_CARTX;

Line 490: raise PDE_QUIT_DEBUG_CARTX;

486: if (ack < DEBUG_CARTX_SUCCESS) then
487: getDebugSessionId(SessId);
488: handleAborts(ack, Sessid);
489: cleanup_pipes(PipeName);
490: raise PDE_QUIT_DEBUG_CARTX;
491: end if;
492: end if;
493: end;
494:

Line 527: -- raise PDE_QUIT_DEBUG_CARTX;

523: cleanup_pipes(pipeName);
524: sDownloadFileList := ' ';
525: nCompress := -1;
526: return;
527: -- raise PDE_QUIT_DEBUG_CARTX;
528: end if;
529:
530:
531: msgType := sys.dbms_pipe.Next_Item_Type;

Line 536: sendAck(pipename, DEBUG_CARTX_SUCCESS, status);

532: if (msgType = 6) then
533: sys.dbms_pipe.unpack_message(nCompress);
534: end if;
535:
536: sendAck(pipename, DEBUG_CARTX_SUCCESS, status);
537: else
538: htp.htmlopen;
539: htp.headopen;
540: htp.print('An error occurred while recieving the results. '

Line 554: if (sDownloadFileList = DEBUG_CARTX_BYE) then

550: sDownloadFileList := ' ';
551: nCompress := -1;
552: end if;
553:
554: if (sDownloadFileList = DEBUG_CARTX_BYE) then
555: cleanup_pipes(pipeName);
556: raise PDE_QUIT_DEBUG_CARTX;
557: end if;
558:

Line 556: raise PDE_QUIT_DEBUG_CARTX;

552: end if;
553:
554: if (sDownloadFileList = DEBUG_CARTX_BYE) then
555: cleanup_pipes(pipeName);
556: raise PDE_QUIT_DEBUG_CARTX;
557: end if;
558:
559: msg := '';
560: --Now receive the htp page data.

Line 573: numLines := DEBUG_CARTX_RES_OVER;

569: elsif(msgType = 6) then
570: sys.dbms_pipe.unpack_message(numLines);
571: else
572: --Weird type. Something is wrong... Get out...
573: numLines := DEBUG_CARTX_RES_OVER;
574: end if;
575:
576: if (numLines = DEBUG_CARTX_RES_OVER) then
577: sendAck(pipename, DEBUG_CARTX_SUCCESS, status);

Line 576: if (numLines = DEBUG_CARTX_RES_OVER) then

572: --Weird type. Something is wrong... Get out...
573: numLines := DEBUG_CARTX_RES_OVER;
574: end if;
575:
576: if (numLines = DEBUG_CARTX_RES_OVER) then
577: sendAck(pipename, DEBUG_CARTX_SUCCESS, status);
578: exit;
579: end if;
580:

Line 577: sendAck(pipename, DEBUG_CARTX_SUCCESS, status);

573: numLines := DEBUG_CARTX_RES_OVER;
574: end if;
575:
576: if (numLines = DEBUG_CARTX_RES_OVER) then
577: sendAck(pipename, DEBUG_CARTX_SUCCESS, status);
578: exit;
579: end if;
580:
581: if (numLines > 0) then

Line 597: sendAck(pipename, DEBUG_CARTX_SUCCESS, status);

593: end if;
594: END LOOP;
595: end if;
596: /* Send ack for receiving a message. */
597: sendAck(pipename, DEBUG_CARTX_SUCCESS, status);
598: end if;
599: end loop;
600:
601:

Line 603: when PDE_QUIT_DEBUG_CARTX then

599: end loop;
600:
601:
602: exception
603: when PDE_QUIT_DEBUG_CARTX then
604: return;
605: end;
606:
607:

Line 628: if (msg = DEBUG_CARTX_BYE) then

624: msgType := sys.dbms_pipe.next_item_type;
625: if (msgType != 0) then
626: if (msgType = 9) then
627: sys.dbms_pipe.unpack_message(msg);
628: if (msg = DEBUG_CARTX_BYE) then
629: status := -1;
630: else
631: num_params := to_number(msg);
632: end if;

Line 658: msg := DEBUG_CARTX_SUCCESS;

654: END LOOP;
655: -- insertmessage('Trying to initialize cgi environment.');
656: owa.init_cgi_env(num_params, param_name, param_val);
657:
658: msg := DEBUG_CARTX_SUCCESS;
659: else
660: msg := DEBUG_CARTX_BYE;
661:
662: end if; --end of if status = 0

Line 660: msg := DEBUG_CARTX_BYE;

656: owa.init_cgi_env(num_params, param_name, param_val);
657:
658: msg := DEBUG_CARTX_SUCCESS;
659: else
660: msg := DEBUG_CARTX_BYE;
661:
662: end if; --end of if status = 0
663: -- insertmessage('Sending ack' || SessionID || 'Res');
664: sendAck(SessionID || 'Res', msg, status);

Line 727: if (ack < DEBUG_CARTX_SUCCESS) then

723:
724: locstatus := sys.dbms_pipe.Send_Message(resPipeName, 3600);
725: ack := waitForAck(SessionID, res);
726:
727: if (ack < DEBUG_CARTX_SUCCESS) then
728: handleAborts(ack, SessID);
729: cleanup_pipes(SessionID);
730: raise PDE_QUIT_DEBUG_CARTX;
731: end if;

Line 730: raise PDE_QUIT_DEBUG_CARTX;

726:
727: if (ack < DEBUG_CARTX_SUCCESS) then
728: handleAborts(ack, SessID);
729: cleanup_pipes(SessionID);
730: raise PDE_QUIT_DEBUG_CARTX;
731: end if;
732:
733: --Now send the htp page.
734: loop

Line 739: numLines := DEBUG_CARTX_RES_OVER;

735: numLines := 10;
736: owa.get_page(Lines, numLines);
737:
738: if (numLines = 0) then
739: numLines := DEBUG_CARTX_RES_OVER;
740: end if;
741:
742: if (numLines > 0) then
743: /* Only if we have message to send, send! */

Line 754: if (ack < DEBUG_CARTX_SUCCESS) then

750:
751: locstatus := sys.dbms_pipe.Send_Message(resPipeName, 3600);
752: ack := waitForAck(SessionID, res);
753:
754: if (ack < DEBUG_CARTX_SUCCESS) then
755: handleAborts(ack, SessID);
756: cleanup_pipes(SessionID);
757: raise PDE_QUIT_DEBUG_CARTX;
758: end if;

Line 757: raise PDE_QUIT_DEBUG_CARTX;

753:
754: if (ack < DEBUG_CARTX_SUCCESS) then
755: handleAborts(ack, SessID);
756: cleanup_pipes(SessionID);
757: raise PDE_QUIT_DEBUG_CARTX;
758: end if;
759: end if;
760:
761: if (numLines < 10) then

Line 762: numLines := DEBUG_CARTX_RES_OVER;

758: end if;
759: end if;
760:
761: if (numLines < 10) then
762: numLines := DEBUG_CARTX_RES_OVER;
763: sys.dbms_pipe.Pack_Message(numLines);
764: locstatus := sys.dbms_pipe.Send_Message(resPipeName, 3600);
765: ack := waitForAck(SessionID, res);
766:

Line 767: if (ack < DEBUG_CARTX_SUCCESS) then

763: sys.dbms_pipe.Pack_Message(numLines);
764: locstatus := sys.dbms_pipe.Send_Message(resPipeName, 3600);
765: ack := waitForAck(SessionID, res);
766:
767: if (ack < DEBUG_CARTX_SUCCESS) then
768: handleAborts(ack, SessID);
769: cleanup_pipes(SessionID);
770: raise PDE_QUIT_DEBUG_CARTX;
771: end if;

Line 770: raise PDE_QUIT_DEBUG_CARTX;

766:
767: if (ack < DEBUG_CARTX_SUCCESS) then
768: handleAborts(ack, SessID);
769: cleanup_pipes(SessionID);
770: raise PDE_QUIT_DEBUG_CARTX;
771: end if;
772: exit;
773: end if;
774: end loop;

Line 800: msg := DEBUG_CARTX_SUCCESS;

796: sys.dbms_pipe.unpack_message(procname);
797: else
798: DBMS_OUTPUT.PUT_LINE('Weird Message Type ' || to_char(msgType));
799: end if;
800: msg := DEBUG_CARTX_SUCCESS;
801:
802: sendAck(SessionID || 'Res', msg, status);
803: end if;
804:

Line 886: sendAck(SessionID || 'Res', DEBUG_CARTX_SUCCESS, status);

882: -- execBlock := execBlock || 'Debug.Suspend;' || newline;
883: execBlock := execBlock || source || newline;
884: elsif (source = 'End;') then
885: execblock := execBlock || source;
886: sendAck(SessionID || 'Res', DEBUG_CARTX_SUCCESS, status);
887: exit;
888: else
889: execblock := execBlock || source || newline;
890: end if;

Line 891: sendAck(SessionID || 'Res', DEBUG_CARTX_SUCCESS, status);

887: exit;
888: else
889: execblock := execBlock || source || newline;
890: end if;
891: sendAck(SessionID || 'Res', DEBUG_CARTX_SUCCESS, status);
892:
893: else
894: sendAck(SessionID || 'Res', DEBUG_CARTX_ERR, status);
895: exit; --status has the error code.

Line 894: sendAck(SessionID || 'Res', DEBUG_CARTX_ERR, status);

890: end if;
891: sendAck(SessionID || 'Res', DEBUG_CARTX_SUCCESS, status);
892:
893: else
894: sendAck(SessionID || 'Res', DEBUG_CARTX_ERR, status);
895: exit; --status has the error code.
896: end if;
897:
898: end loop;

Line 916: END DEBUG_CARTX;

912: end if;
913: return 0;
914: end;
915:
916: END DEBUG_CARTX;
917:
918: