Foren
Session Expiry Event
MANOVINAYAK AYYAPPAN, geändert vor 12 Jahren.
Session Expiry Event
Regular Member Beiträge: 131 Beitrittsdatum: 13.06.11 Neueste Beiträge
Hi All,
I am looking for a Liferay event that gets triggered when User Session times Out. On Session Time Out I would like to do some operation.
My Objective is to detect Session Timeout and perform some action.
Please help me in this regard.
Regards,
Mano
I am looking for a Liferay event that gets triggered when User Session times Out. On Session Time Out I would like to do some operation.
My Objective is to detect Session Timeout and perform some action.
Please help me in this regard.
Regards,
Mano
Sandeep Nair, geändert vor 12 Jahren.
RE: Session Expiry Event
Liferay Legend Beiträge: 1744 Beitrittsdatum: 06.11.08 Neueste Beiträge
Hi,
I have never tried this but try creating session destroy event hook. In the hook add the follwoing in portal.properties. It is same as service pre event.
#
# Servlet session destroy event
#
servlet.session.destroy.events=com.test.YourSessionExpiryAction
Regards,
Sandeep
I have never tried this but try creating session destroy event hook. In the hook add the follwoing in portal.properties. It is same as service pre event.
#
# Servlet session destroy event
#
servlet.session.destroy.events=com.test.YourSessionExpiryAction
Regards,
Sandeep
MANOVINAYAK AYYAPPAN, geändert vor 12 Jahren.
RE: Session Expiry Event
Regular Member Beiträge: 131 Beitrittsdatum: 13.06.11 Neueste Beiträge
Hi Sandeep,
Thanks a lot !!
I will try this one and let you know soon!!
Regards,
Mano
Thanks a lot !!
I will try this one and let you know soon!!
Regards,
Mano
Sandeep Nair, geändert vor 12 Jahren.
RE: Session Expiry Event
Liferay Legend Beiträge: 1744 Beitrittsdatum: 06.11.08 Neueste Beiträge
Hi,
Sorry forgot to tell, just make sure you extend SessionAction
Regards,
Sandeep
Sorry forgot to tell, just make sure you extend SessionAction
Regards,
Sandeep
MANOVINAYAK AYYAPPAN, geändert vor 12 Jahren.
RE: Session Expiry Event
Regular Member Beiträge: 131 Beitrittsdatum: 13.06.11 Neueste Beiträge
Hi Sandeep,
Thanks a lot this works fine . I was able to trigger the custom event and perform my custom action before the session expiry.
Thanks a lot !!!
Thanks and Regards,
Mano
Thanks a lot this works fine . I was able to trigger the custom event and perform my custom action before the session expiry.
Thanks a lot !!!
Thanks and Regards,
Mano
Vishal Panchal, geändert vor 11 Jahren.
RE: Session Expiry Event
Expert Beiträge: 289 Beitrittsdatum: 20.05.12 Neueste BeiträgeSandeep Nair:
Hi,
Sorry forgot to tell, just make sure you extend SessionAction
Regards,
Sandeep
Hi Sandeep,
Thanks for your contribution it worked for me.
Thanks,
Vishal
Advait Trivedi, geändert vor 9 Jahren.
RE: Session Expiry Event
Junior Member Beiträge: 56 Beitrittsdatum: 30.03.10 Neueste Beiträge
Hi Sandip,
servlet.session.destroy.events is called when user logs out using logout link and also when session is destroyed by a time out event.
I want to perform some custom action only when the session times out, and not when session is destroyed because of user explicitly logging out.
Is it possible in liferay?
Thanks,
Advait
servlet.session.destroy.events is called when user logs out using logout link and also when session is destroyed by a time out event.
I want to perform some custom action only when the session times out, and not when session is destroyed because of user explicitly logging out.
Is it possible in liferay?
Thanks,
Advait
hung park, geändert vor 7 Jahren.
RE: Session Expiry Event
New Member Beiträge: 3 Beitrittsdatum: 03.06.16 Neueste Beiträge
Hi Advait,
Were you able to find a way to resolve this issue? I am also having same case where both session destroyed is called when user clicks log out.
Thank you,
Hung Park
Were you able to find a way to resolve this issue? I am also having same case where both session destroyed is called when user clicks log out.
Thank you,
Hung Park
Advait Trivedi:
Hi Sandip,
servlet.session.destroy.events is called when user logs out using logout link and also when session is destroyed by a time out event.
I want to perform some custom action only when the session times out, and not when session is destroyed because of user explicitly logging out.
Is it possible in liferay?
Thanks,
Advait
Vivek Mehta, geändert vor 4 Jahren.
RE: Session Expiry Event
Junior Member Beiträge: 48 Beitrittsdatum: 07.04.19 Neueste Beiträge
Hi Hung,
For this, You can make use of a global boolean variable let say "isLogout" and set it to "true" in the logout action class. Now, in the session expiry class ;perform all your actions inside the " if( ! isLogout ) { } " . This way you can perform operations only after session expiry and not by user log out.
For this, You can make use of a global boolean variable let say "isLogout" and set it to "true" in the logout action class. Now, in the session expiry class ;perform all your actions inside the " if( ! isLogout ) { } " . This way you can perform operations only after session expiry and not by user log out.