Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
MANOVINAYAK AYYAPPAN
Session Expiry Event
November 14, 2011 2:08 AM
Answer

MANOVINAYAK AYYAPPAN

Rank: Regular Member

Posts: 132

Join Date: June 13, 2011

Recent Posts

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
Sandeep Nair
RE: Session Expiry Event
November 14, 2011 2:07 AM
Answer

Sandeep Nair

Rank: Liferay Legend

Posts: 1721

Join Date: November 5, 2008

Recent Posts

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
MANOVINAYAK AYYAPPAN
RE: Session Expiry Event
November 14, 2011 2:10 AM
Answer

MANOVINAYAK AYYAPPAN

Rank: Regular Member

Posts: 132

Join Date: June 13, 2011

Recent Posts

Hi Sandeep,

Thanks a lot emoticon !!

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


Regards,
Mano
Sandeep Nair
RE: Session Expiry Event
November 14, 2011 2:38 AM
Answer

Sandeep Nair

Rank: Liferay Legend

Posts: 1721

Join Date: November 5, 2008

Recent Posts

Hi,

Sorry forgot to tell, just make sure you extend SessionAction

Regards,
Sandeep
MANOVINAYAK AYYAPPAN
RE: Session Expiry Event
November 14, 2011 3:11 AM
Answer

MANOVINAYAK AYYAPPAN

Rank: Regular Member

Posts: 132

Join Date: June 13, 2011

Recent Posts

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
Vishal Panchal
RE: Session Expiry Event
February 1, 2013 1:27 AM
Answer

Vishal Panchal

Rank: Expert

Posts: 280

Join Date: May 20, 2012

Recent Posts

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
Advait Trivedi
RE: Session Expiry Event
June 25, 2014 2:10 PM
Answer

Advait Trivedi

Rank: Junior Member

Posts: 56

Join Date: March 30, 2010

Recent Posts

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