Requirements for database-side JDBC routines using nested connections
In order to preserve transactional atomicity, database-side JDBC
routines that use nested connections have the following limitations.
Can issue a commit or rollback only within a procedure (not a function).
Cannot change the auto-commit connection attribute.
Cannot modify the data in a table used by the parent statement that called
the routine, using INSERT, UPDATE, or DELETE. For example, if a SELECT statement
using the T table calls the changeTables procedure, changeTables cannot
modify data in the T table.
Cannot drop a table used by the statement that called the routine.
Cannot be in a class whose static initializer executes DDL statements.
In addition, the Connection object that represents the nested connection
always has its auto-commit mode set to false.