내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

User session management during page update or new app deployment

Avatar

Level 2

Hi,

Can someone describe how CQ manages user session when for example user works with some cq page which related with another pages 

and in middle of his work process CQ page is updated by new publish, so user session can be spoiled by unexpected update, how CQ can

handle this case?

Also what about services, user works with page which all time use some OSGi service deployed on CQ publish, app deployment update this 

service bundle, what happens - page remain using old OSGI service or switching to newly deployed version?

I can't find this information in google, please help by describing or pointing to proper doc resources 

 

Thanks

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Employee Advisor

Hi,

First of all, the recommended way to develop AEM projects is to avoid server-side (HTTP) sessions. These impact performance (caching) and operations, and are generally considered bad style when you work with an resource-based framework like Sling.

In the AEM world the word "session" can also mean "JCR sessions" (which should be abstracted away in most cases by the Sling ResourceResolver). These sessions are recommended to live as short as possible, the normal style is to create a session per request (which is already done by the sling framework for you). If you need to access the JCR repository also in OSGI services, it is up to you, the general recommendation "short-lived sessions" holds true here as well.

So can you clarify a bit, in which aspects of "sessions" you are interested in?

kind regards,
Jörg

원본 게시물의 솔루션 보기

2 답변 개

Avatar

정확한 답변 작성자:
Employee Advisor

Hi,

First of all, the recommended way to develop AEM projects is to avoid server-side (HTTP) sessions. These impact performance (caching) and operations, and are generally considered bad style when you work with an resource-based framework like Sling.

In the AEM world the word "session" can also mean "JCR sessions" (which should be abstracted away in most cases by the Sling ResourceResolver). These sessions are recommended to live as short as possible, the normal style is to create a session per request (which is already done by the sling framework for you). If you need to access the JCR repository also in OSGI services, it is up to you, the general recommendation "short-lived sessions" holds true here as well.

So can you clarify a bit, in which aspects of "sessions" you are interested in?

kind regards,
Jörg

Avatar

Level 2

I actually mean not session but user experience with working on CQ pages, I don't know if it can be managed over session, I just want to have my user not spoiled in the middle of his unit of work with CQ site when some update of page he can visit done and it can affect him unexpectedly 

I have idea of versioning over JCR+Dispatcher when user session works with constant version of pages from CQ pages until user session is finished. New login will direct users to new pages published and latest version, it will give possibility update Live environment with new pages safely. I thought it was counted in CQ because it quite trivial case, but docs are poor