Interface LuteceConnection

  • All Superinterfaces:
    java.lang.AutoCloseable, java.sql.Connection, java.sql.Wrapper

    public interface LuteceConnection
    extends java.sql.Connection
    Wraps a connection to use ConnectionPool when closing with (Connection.close()). The actual close is done by closeConnection().
    Lutece needs the Connection.close() method to return the connection to the pool. Lutece classes (like DAOUtil uses LuteceConnectionService.freeConnection(Connection) ), but external libraries (such as hibernate) closes connection directly. This interface is a workaround for Connection incompatibilities from java5 to java6. It should be remove as soon as Lutece drop java5 compatibility. No wrapper delegation is possible implementing Connection interface and wrapping one connection. Actually, implementing java5 java.sql.Connection will cause compilation error with jdk6 (not overriding methods), while implementing java6 java.sql.Connection will also cause compilation errors with jdk5 (no such class found).
    See Also:
    closeConnection(), LUTECE-1267
    • Field Summary

      • Fields inherited from interface java.sql.Connection

        TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void closeConnection()
      Actual connection close.
      • Methods inherited from interface java.sql.Connection

        abort, beginRequest, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, endRequest, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid, setTransactionIsolation, setTypeMap
      • Methods inherited from interface java.sql.Wrapper

        isWrapperFor, unwrap
    • Method Detail

      • closeConnection

        void closeConnection()
        Actual connection close.