Skip to content

Version 2.7.0

Choose a tag to compare

@CaesarAugustus27 CaesarAugustus27 released this 28 Oct 18:56
· 152 commits to master since this release

Driver

Fixed

  • SqlScript.split keeps a BEGIN ATOMIC ... END body whole inside its CREATE FUNCTION or CREATE PROCEDURE,
    where it cut the body at every ;.

  • Closing a session opened with getOctaviusSession(ownsConnection = false) leaves the transaction its connection
    was already in for the connection's owner to end. It rolled that transaction back, and the owner's commit()
    then returned normally with the work gone. A transaction the session began itself is still rolled back.

  • OctaviusTemplate under a transaction manager with synchronization switched off leaves its work for Spring to
    commit, where each execute rolled the transaction back as its session closed.

  • A session OctaviusTemplate binds where there is synchronization but no transaction, as under
    PROPAGATION_SUPPORTS, ends before Spring gives the connection back. Its reset ran on a connection already back
    in the pool.

  • Propagation.NESTED inside a running transaction takes a savepoint and raises the same exceptions as REQUIRED,
    where it threw InvalidOperationException(FEATURE_NOT_SUPPORTED) before the nested method ran.

  • A commit whose connection goes during the COMMIT raises NetworkException(CONNECTION_ABORTED), as one on a
    connection already gone does, where it raised TransactionSystemException.

  • A pool that fails to start on the first borrow, for a reason with nothing of the driver's in it, leaves
    OctaviusTemplate and OctaviusJdbcTransactionManager as InitializationException(CONNECTION_ERROR). Hikari's
    PoolInitializationException came through as it was, or inside CannotCreateTransactionException.

Changed

  • [BREAKING] OctaviusTemplate and OctaviusJdbcTransactionManager wrap nothing: the driver's exceptions and
    your own leave them as they were thrown, where an OctaviusDataAccessException stood around the driver's, and
    around yours when one of the driver's was its cause. OctaviusDataAccessException is gone: an
    @ExceptionHandler or a catch names the driver's type, or OctaviusException for all of them.

  • [BREAKING] OctaviusTemplate takes no exception translator, and its constructor is
    OctaviusTemplate(dataSource). OctaviusExceptionTranslator is gone.

  • [BREAKING] OctaviusJdbcTransactionManager extends AbstractPlatformTransactionManager instead of
    JdbcTransactionManager. It has none of the properties JdbcTransactionManager and DataSourceTransactionManager
    add - exceptionTranslator, lazyInit, databaseProductName, enforceReadOnly - and a
    TransactionManagerCustomizer typed to either of them does not reach it. Boot's spring.transaction.* still does.

  • startPollingListenerLoop and startInterruptibleListenerLoop throw InvalidOperationException(CONNECTION_BUSY)
    when a transaction is open on the server, where such a loop waited without ever receiving anything: PostgreSQL
    holds notifications back until the listener's transaction ends.

  • getMetaData() returns a DatabaseMetaData that answers supportsSavepoints() with true and
    getDatabaseProductName() with PostgreSQL, and throws InvalidOperationException(FEATURE_NOT_SUPPORTED) from
    every other method, where getMetaData() itself threw it. Actuator's db health indicator reports UP with no
    connection-test-query set, so a dbHealthIndicator bean declared in its place, as the docs advised, can go.

Migrations

Fixed

  • A .sql migration that defines a function or procedure with a BEGIN ATOMIC body runs, where the scan took the
    body's closing END for a COMMIT and refused the file.