Restricting User Sessions [message #140888] |
Thu, 06 October 2005 01:03  |
sarfraz_attari
Messages: 123 Registered: July 2005
|
Senior Member |
|
|
Hi
Is there any way to Restrict a user to open multiple session through form.
and in case user opens multiple session how can we kill the idle session.
Thanks
Sarfraz
|
|
|
|
|
Re: Restricting User Sessions [message #140902 is a reply to message #140901] |
Thu, 06 October 2005 02:07  |
 |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Killing idle sessions has two main problems - what is an idle session and how to kill it. I have looked into these problems at another place and we gave up on trying to define 'idle' and also on 'killing'. Do we kill the 'lowest' or 'highest' number session? We ended up with too many orphan processors in the application server and often killed the session that the user 'really wanted to keep'.
You could count OSUSER from V$session and in your custom login procedure fail the login in the count is greater than a specific number. Remember that you normally have two AS sessions per working session - one for the JInit and the other the working session. So we set the limit to 4.
You could also increment a counter in a table when the user starts and decrement it when they leave. Unfortuntely, if the session crashes the decrement may not happen and then you have to, somehow, know when to reset the table entry.
David
|
|
|