掲示板
Session Expiry Event
12年前 に MANOVINAYAK AYYAPPAN によって更新されました。
Session Expiry Event
Regular Member 投稿: 131 参加年月日: 11/06/13 最新の投稿
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
12年前 に Sandeep Nair によって更新されました。
RE: Session Expiry Event
Liferay Legend 投稿: 1744 参加年月日: 08/11/06 最新の投稿
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
12年前 に MANOVINAYAK AYYAPPAN によって更新されました。
RE: Session Expiry Event
Regular Member 投稿: 131 参加年月日: 11/06/13 最新の投稿
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
12年前 に Sandeep Nair によって更新されました。
RE: Session Expiry Event
Liferay Legend 投稿: 1744 参加年月日: 08/11/06 最新の投稿
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
12年前 に MANOVINAYAK AYYAPPAN によって更新されました。
RE: Session Expiry Event
Regular Member 投稿: 131 参加年月日: 11/06/13 最新の投稿
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
Sandeep 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
9年前 に Advait Trivedi によって更新されました。
RE: Session Expiry Event
Junior Member 投稿: 56 参加年月日: 10/03/30 最新の投稿
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
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
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.