Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

session logout clarification

manikanthar1295
Level 4
Level 4

Hi,

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 ??

 

 

 

 

 

1 Accepted Solution
Bhuwan_B
Correct answer by
Community Advisor
Community Advisor

Please refer to below documentation URL:

https://experienceleague.adobe.com/docs/experience-cloud-kcs/kbarticles/KA-16548.html

 

Important Note:

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.

 

View solution in original post

0 Replies
Bhuwan_B
Correct answer by
Community Advisor
Community Advisor

Please refer to below documentation URL:

https://experienceleague.adobe.com/docs/experience-cloud-kcs/kbarticles/KA-16548.html

 

Important Note:

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.

 

View solution in original post