org.geotools.jdbc
Interface ConnectionLifecycleListener

All Known Implementing Classes:
SessionCommandsListener

public interface ConnectionLifecycleListener

This interface can be implemented to perform custom behavior on each connection as it gets borrowed from the connection pool and then released back to the pool.

Author:
Andrea Aime - GeoSolutions

Method Summary
 void onBorrow(JDBCDataStore store, Connection cx)
          Called when the collection is being borrowed from the connection pool
 void onCommit(JDBCDataStore store, Connection cx)
          Called when the connection comes to a commit
 void onRelease(JDBCDataStore store, Connection cx)
          Called when the collection is being released back to the connection pool
 void onRollback(JDBCDataStore store, Connection cx)
          Called when the connection comes to a rollback
 

Method Detail

onBorrow

void onBorrow(JDBCDataStore store,
              Connection cx)
              throws SQLException
Called when the collection is being borrowed from the connection pool

Throws:
SQLException

onRelease

void onRelease(JDBCDataStore store,
               Connection cx)
               throws SQLException
Called when the collection is being released back to the connection pool

Throws:
SQLException

onCommit

void onCommit(JDBCDataStore store,
              Connection cx)
              throws SQLException
Called when the connection comes to a commit

Throws:
SQLException

onRollback

void onRollback(JDBCDataStore store,
                Connection cx)
                throws SQLException
Called when the connection comes to a rollback

Throws:
SQLException


Copyright © 1996-2014 Geotools. All Rights Reserved.