Interface LuteceConnection

All Superinterfaces:
AutoCloseable, Connection, Wrapper

public interface LuteceConnection extends 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:
  • Method Details

    • closeConnection

      void closeConnection()
      Actual connection close.