Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Web Application Server 3.0.1 - Enabling Transactions - Help needed

Web Application Server 3.0.1 - Enabling Transactions - Help needed

From: Yves Bolognini <yves_at_bolo.ch>
Date: 1998/10/14
Message-ID: <3624970C.C71C2A0@bolo.ch>#1/1

Hi,

We've installed the Web Application Server (advanced version) and now we would like to enable the transactions. We have done everything as explained in the doc
(see http://www.olab.com/doc/books/plsql/pl_trans.htm), but we can not make it work.

Here is our package (spec and body) with
...startTest defined as transaction's Begin procedure
...commitTX defined as transaction's Commit procedure
...rollbackTX defined as transaction's Rollback procedure

Do we miss something ?

Thanks a lot for your help,

Yves Bolognini
Bolo's Computer Museum - http://www.bolo.ch



package TEST_TX
is

    viCount integer := 0;
    procedure startTest;
    procedure displayForm (

        avMessage in varchar2 );
    procedure insertRecord (

        avNom in varchar2,
        aiAge in integer );

    procedure displayTable;
    procedure commitTX;
    procedure rollbackTX;
end;

package body TEST_TX
is

    procedure startTest
    is
    begin

        displayForm('Welcome');
    end;

    procedure displayForm (

        avMessage in varchar2 )
    is
    begin

        htp.print(avMessage);
        htp.print('<FORM ACTION="' ||
            owa_util.get_owa_service_path || 'TEST_TX.insertRecord">');
        htp.print('Nom : <INPUT TYPE="TEXT" NAME="avNom"
SIZE="20"><BR>');
        htp.print('Age : <INPUT TYPE="TEXT" NAME="aiAge" SIZE="3"><P>');

        htp.print('<INPUT TYPE="SUBMIT" VALUE="Add">');
        htp.print('<INPUT TYPE="BUTTON" VALUE="Commit"
onClick="top.location=''' ||
            owa_util.get_owa_service_path || 'TEST_TX.commitTX'';">');
        htp.print('<INPUT TYPE="BUTTON" VALUE="Rollback"
onClick="top.location=''' ||
            owa_util.get_owa_service_path || 'TEST_TX.rollbackTX'';">');

        htp.print('</FORM>');
        displayTable;

    end;

    procedure insertRecord (

        avNom in varchar2,
        aiAge in integer )

    is
    begin
        insert into
            TEST_TX
        values (
            avNom,
            aiAge );
        viCount := viCount + 1;
        displayForm('Inserted (' || avNom || ',' || aiAge || ')');
    end;

    procedure displayTable
    is

        cursor vuTable is
            select
                *
            from
                TEST_TX;
    begin
        htp.print('<TABLE>');
        for vrTable in vuTable loop
            htp.print('<TR>');
            htp.print('<TD>' || vrTable.NOM || '</TD>');
            htp.print('<TD>' || vrTable.AGE || '</TD>');
            htp.print('</TR>');
        end loop;
        htp.print('</TABLE>');

    end;

    procedure commitTX
    is
    begin

        htp.print('Commited ' || viCount || ' rows<P>');
        htp.print('<A HREF="' || owa_util.get_owa_service_path ||
'TEST_TX.startTest">Restart</A>');
        viCount := 0 ;

    end;

    procedure rollbackTX
    is
    begin

        htp.print('Rolled back ' || viCount || ' rows<P>');
        htp.print('<A HREF="' || owa_util.get_owa_service_path ||
'TEST_TX.startTest">Restart</A>');
        viCount := 0 ;

    end;

end;


Received on Wed Oct 14 1998 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US