Change methods getConnection, closeConnection to protected visible.
Update delete method - delete data after release/shut down repository. Issue #687.