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
BedrockMission!

Learn More

View all

Sign in to view all badges

session logout clarification

Avatar

Avatar
Affirm 1
Level 3
manikanthar1295
Level 3

Likes

7 likes

Total Posts

83 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
Validate 25
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Affirm 1
Level 3
manikanthar1295
Level 3

Likes

7 likes

Total Posts

83 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
Validate 25
Give Back 10
Give Back 5
Give Back 3
View profile
manikanthar1295
Level 3

05-06-2021

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

 

 

 

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 100
Level 5
Bhuwan_B
Level 5

Likes

100 likes

Total Posts

97 posts

Correct Reply

35 solutions
Top badges earned
Boost 100
Give Back 3
Affirm 25
Establish
Give Back
View profile

Avatar
Boost 100
Level 5
Bhuwan_B
Level 5

Likes

100 likes

Total Posts

97 posts

Correct Reply

35 solutions
Top badges earned
Boost 100
Give Back 3
Affirm 25
Establish
Give Back
View profile
Bhuwan_B
Level 5

06-06-2021

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.

 

Answers (0)