I have the below use case: I am using AEM 6.4 version. There is a third party integration with Magento. The session object gets interchange(i think so) as the logged in user information (first name, last name) gets interchange with another user,for example User A is logged in but intermittently on page header it shows user name as B or any other random user name, sometimes it shows correct user name as well. The sling model is using in the code to retrieve the session id and then fetching the user info from AEM repository and displays it on UI but on contrary the session is perfectly managed on Magento pages (It shows correct user name when clicked on username hyperlink on AEM header page, on click it takes to magento user info page.)
Pls do let me know any clues for this, due to this intermittent behavior user is not able to use add-to-cart functionality( as session is someone's else)
Thanks,
Shivam
Solved! Go to Solution.
Views
Replies
Total Likes
Maybe you can provide some parts of your code, but if you are using a servlet to retrieve that data, you should read: https://blogs.perficient.com/2017/12/05/2-common-concurrency-pitfalls-in-aem-and-how-to-avoid-them/ (the "Member Variables in OSGi Services" section).
Hi @shivama92274331,
This should be an issue with the model which is fetching the user session. Please find my answer here. I have tried it from my end and it worked fine for me.
Hope this helps.
Thanks,
Kiran Vedantam.
Views
Replies
Total Likes
Maybe you can provide some parts of your code, but if you are using a servlet to retrieve that data, you should read: https://blogs.perficient.com/2017/12/05/2-common-concurrency-pitfalls-in-aem-and-how-to-avoid-them/ (the "Member Variables in OSGi Services" section).