Initializing externalTransactionManagementAdapter with a Session creating closure allows to execute Squeryl statements without the need of using 'transaction' and 'inTransaction'. The use case for this is to allow Squeryl connection/transactions to be managed by an external framework. In this case Session.cleanupResources needs to be called when connections are closed, otherwise statement of resultset leaks can occur.
Initializing externalTransactionManagementAdapter with a Session creating closure allows to execute Squeryl statements without the need of using 'transaction' and 'inTransaction'. The use case for this is to allow Squeryl connection/transactions to be managed by an external framework. In this case Session.cleanupResources needs to be called when connections are closed, otherwise statement of resultset leaks can occur.