掲示板

Session Expiry Event

thumbnail
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
thumbnail
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
thumbnail
12年前 に MANOVINAYAK AYYAPPAN によって更新されました。

RE: Session Expiry Event

Regular Member 投稿: 131 参加年月日: 11/06/13 最新の投稿
Hi Sandeep,

Thanks a lot emoticon !!

I will try this one and let you know soonemoticon!!


Regards,
Mano
thumbnail
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
thumbnail
12年前 に MANOVINAYAK AYYAPPAN によって更新されました。

RE: Session Expiry Event

Regular Member 投稿: 131 参加年月日: 11/06/13 最新の投稿
Hi Sandeep,

Thanks a lot this works fine emoticon. I was able to trigger the custom event and perform my custom action before the session expiry.

Thanks a lot emoticon !!!

Thanks and Regards,
Mano
thumbnail
11年前 に Vishal Panchal によって更新されました。

RE: Session Expiry Event

Expert 投稿: 289 参加年月日: 12/05/20 最新の投稿
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
7年前 に hung park によって更新されました。

RE: Session Expiry Event

New Member 投稿: 3 参加年月日: 16/06/03 最新の投稿
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

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
4年前 に Vivek Mehta によって更新されました。

RE: Session Expiry Event

Junior Member 投稿: 48 参加年月日: 19/04/07 最新の投稿
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.