Connection pooling support

Store release function in order to be able to release the connection to the pool again