AO SQL Pool Changelog

ao-sql-pool-0.1.0-SNAPSHOT

Snapshot Notes

  • New project split from AOCode Public for legacy AO JDBC connection pool.
  • AOConnectionPool improvements:
    1. Now logs SQLWarning before both reset and/or close. Previously, warnings were only logged on reset.
    2. Now rolls-back transaction when connection is not auto-commit during both reset and close. This is done to not rely on underlying JDBC driver implementation specifics, and to always rollback a transaction unless explicitly committed.
    3. New static methods defaultLogConnection(Connection, Logger) and defaultResetConnection(Connection), which can be used to log and reset connections in a compatible way.
    4. New constant IDLE_READ_ONLY that defines the read-only state of connections when reset, set to true. Connections are reset when first created and before being released back to the pool.Previously, various parts of the code would assume reset to read-only - this centralizes that assumption.
    5. Deprecated AOPool.releaseConnection(C) in favor of AutoCloseable.close() for use in try-with-resources:
      1. New protected method AOPool.release(C) that performs the release.
      2. Every pooled object must now implement AutoCloseable in a way that results in a call to AOPool.release(C) without the underlying connection closed.
    6. Internally uses the new AO SQL Tracker project to a close all connection-related resources before returning to the pool.
    7. Connections from AOConnectionPool may now be safely shared between threads. When a connection is shared between threads, the maxConnections calculation, along with associated warnings and constraints, is relative to the allocating thread.