cancel
Showing results for 
Search instead for 
Did you mean: 

Catch Session Expiry Event in JSPDynPage

Former Member
0 Kudos

Hi All,

I am using EP6.0 which connect to backend: R/3 version 4.6c. I have a JSPDynPage application that keeps the Portal connection to R/3 in the duration of the session since I need to lock certain infomation in R/3.

Now, in the event when the user session ends I need to disconnect from R/3 and release all the locks. Is there any mechanism to detect user session ends in portal. I tried to catch when the JSPDynPage instance being GC-ed (during finalized) but it seems that JSPDynPage instance is GC-ed after less than 2 minutes inactivity from the user and recreate the instance in the next request as long as the user session still valid.

Thanks,

Ti.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

The only way to detect the expiry of session logoff of the user is to watch for the 2 specific events.

1. Action on the logoff link in the masthead Iview.

2. Sudden closure of window( window event) either by the user, or by the client system.

Regards,

Harish

(Please award points for helpful answers)

Former Member
0 Kudos

Hi Harish,

Thanks for the reply. Is there any mechanism in SAP to catch those clients (browsers) event like close window/the page has been unloaded and notify the server?

Would there be a specific event that can be caught for "logoff"?

Thanks,

Ti.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

The logoff event can be caught in the source code of masthead Iview.You can write a javascript method to be called , when the link is clicked. If I am not wrong such a script function already exists. You will just have to write your implementation in that.

<BODY onUnload="closeDep()"> this kind of tag can work, if the page is closing. I have not tried this in multi frame scenario. Just check this up as well, you can have this probably in masthead.

Regards,

Harish

(Please award points for helpful answers)

Message was edited by: HARISH SUBRAMANIAN

Former Member
0 Kudos

Thanks Harish,

I have already awarded points for both of your answers.

Ti.