protected void handleException(Exception e) {
// TODO: This is definitely not what we want to do.
// Inspect the exception and register flash messages for certain
// exceptions (versioning, locking, ...)
Behavior behavior = getJcrSession().getBehavior();
if (behavior != null) {
behavior.handleException(e);
} else {
if (e instanceof RepositoryException) {
throw new JcrException((RepositoryException) e);
} else {
throw new RuntimeException(e);