The first time we're opening the repository, the connection is used for initializing the database if needed. Databases requires the connection being ran in a non transactional mode for executing DDL operations. Since NXP-19361, we're always running a transaction when accessing to the repository. So JDBC pools are always returning connection running in transactional mode.
Instead of operating directly with the auto-commit mode when we're invoking the database creation, we should instead operate on the transaction before obtaining the connecrion from the pool.