if (getSession().connection().isReadOnly()) {
getSession().connection().setReadOnly(false);
}
}
catch (HibernateException e) {
throw new WGBackendException("unable to establish a read/write connection.", e);
}
catch (SQLException e) {
throw new WGBackendException("unable to establish a read/write connection.", e);
}
}
getSession().beginTransaction();
} else {