cancel
Showing results for 
Search instead for 
Did you mean: 

Session Termination

govardan_raj
Contributor
0 Kudos

Hi experts,

Is it possible to terminate a session(IClient Session) using Session ID(String) , like when we log into portal nwa , there is session monitoring and we have option to terminate a session from the list of active sessions against a user .

Please let me know if we have any webdynpro java code to terminate the session Remotely.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

There are no public APIs for your requirement, com.sap.engine.session is for internal use only. Unless you have access to the request object, I don't think you can invalidate the session. Session Management is quite complicated, consisting of several application layers that have to be invalidated in the right order and in sync.

govardan_raj
Contributor
0 Kudos

Hi Samuli Kaski ,

Thanks for yor reply , can u please suggest me is there any other way to session management from portal side , we have requirement where if a user logs in to the portal and again opens another session with same credentials then we have to terminate the older session please suggest me a solution , to avoid overloading to the server.

Regards

Govardan Raj S

Former Member
0 Kudos

No there isn't, as I replied to your other discussion thread.

govardan_raj
Contributor
0 Kudos

Hi Samuli Kaski ,

Thanks and sorry for late reply , actually im  using customized mast head component,

the basic procedure that im usig is as follows ,

UserA logs in to portal with sessionid as abcd1234 , im storing this in database with username and session id. using stored procedure, and im calling this stored procedure for every 10 seconds for testing purpose.

Now if UserA logs in again with another session say session id is defg5678( for explanation but session ids are very long unique numbers) now this is also stored in data base ,

Now when  the stored procedure is being called from session abcd1234 as  i told earlier  that it is called for every 10 seconds, now since new session id is openend the stored procedure returns me a parameter as an  alert  to call logoff()  function , here logoff() function is java script function available in the mast head component .

Now my im stuck at this point

<%if(alert from db to logoff )

{%>

  logoff();

<%}%>

here the if ( alert from db to logoff) has a value false that is obtained when my mast head jsp is intially loaded but later , even though value obtained from db indicates to call logoff() function , the java script function is not being called , not only this none of the java script functions like alert("äbc")  etc are called , but when i refresh the page , the condition becomes true and log() function is being called and portal will logoff().

Please help me out sorry for such a long message

Regards

Govardan

Answers (0)