} catch (HibernateException e) {
throw new PropertyException("Could not remove key '" + key + "': " + e.getMessage());
} finally {
try {
if (session != null) {
if (!session.connection().getAutoCommit()) {
session.connection().commit();
}
session.close();
}