how do i start and end a transaction with hsqlb?

Jorge Garcia de Alba <[email protected]> Sat, 4 May 2019 21:41:22 -0500
Newsgroups gmane.comp.java.hsqldb.user
Message-ID <CAEVgvV9=5jasuQU4YxFxE=4N3acmkOK1E_sQGUOcSuCjUHziBg@mail.gmail.com>
Hello,

I would like to run a batch of statements and/or procedures and if
there is an exception rollback.

Something like:

   try
        {
            connection.setAutoCommit(false);
            //insert, update, delete statements and/or procedures
            connection.commit();
        }
        catch (Exception e)
        {
            connection.rollback();
        }

How do I setup hsqldb to do this?

jr