Interface SmartDataSource

    • Method Detail

      • shouldClose

        boolean shouldClose​(Connection con)
        Should we close this Connection, obtained from this DataSource?

        Code that uses Connections from a SmartDataSource should always perform a check via this method before invoking close().

        Note that the JdbcTemplate class in the 'jdbc.core' package takes care of releasing JDBC Connections, freeing application code of this responsibility.

        Parameters:
        con - the Connection to check
        Returns:
        whether the given Connection should be closed
        See Also:
        Connection.close()