Sign in to Community
Sign in to view all badges
Need some clarification on session in AEM.
When ever we create jcr session explicitly we need to session.logout() method to avoid session leaking is my understanding is right.
But if we adopt session by workflow Session like below
Session session = worflowSession.adaptTo(Session.class);
did we need to close session by session.logout or not
i have written many workflow in my project by i have not done session.logout() will it automatically closing in case of workflowsession ??
Please refer to below documentation URL:
Session and ResourceResolver objects that are obtained via the SlingRequest or WorkflowSession should not to be closed by your application. For example:
slingRequest.getResourceResolver().adaptTo(Session.class); //Or workflowSession.getSession();
That resolver and session will be closed automatically after the request has been processed.