Jcr Session is Closed
Hi All,
I am facing issue in session.logout. My code calls one method frequently, first time it runs successfully, next time it says session is closed. below is the finally clause for my method. Shall i not logout the session? Actually i don't want to leave the session in open state, if i have to keep it open, i would have end up leaving lot of open session objects.
Session session = null;
try {
session = resourceResolver.adaptTo(Session.class);
doSomething
} catch(Exception ex) {
} finally {
if(session != null) {
session.logout();
}
}
Please advise how to resolve the issue?