Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Session timeout limit

Posted on 2000-03-16
10
1,568 Views
Last Modified: 2008-02-20
I have restricted all sessions in my database to last not more than 40 minutes. But the front end session from forms, session is not terminated but the client hangs and ending the task is the only way out.

we use windows 95 + D2K R2.1 + oracle 8.0.4 on HP-UX .

any solution
0
Comment
Question by:ashishn
10 Comments
 
LVL 1

Expert Comment

by:aqm
ID: 2623712
Do you have the  resource_limit  parameter to  TRUE ?
Did you executed the Alter System Set resource_Limet = True on your Database ?

The sessions hangs after o before the 40 minutes ?

Are the any table-lock when the session hangs ?

aqm.
0
 
LVL 4

Expert Comment

by:jtrifts
ID: 2624446
You can set a global timer in your forms application and then use a when-timer-expired trigger to disconnect, exit or whatever you wish.

JT
0
 
LVL 2

Expert Comment

by:AndrewRodionov
ID: 2627502
If you want to limit your clients with an idle time, for example, you should use user profile, i.e.

create profile some_profile limit idle_time 40;    // an idle time is 40 minutes
alter user some_user profile some_profile;

Hope that helps.
Andrew
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 2

Expert Comment

by:AndrewRodionov
ID: 2627520
And some more. Your client application should handle the corresponding Oracle messages (ORA-0314 and ORA-0314) and  terminate itself gently.

Andrew
0
 
LVL 2

Expert Comment

by:AndrewRodionov
ID: 2627522
And some more. Your client application should handle the corresponding Oracle messages (ORA-03113 and ORA-03114) and  terminate itself gently.

Andrew
0
 
LVL 2

Expert Comment

by:AndrewRodionov
ID: 2627529
Sorry for the dual answer. Show the latter.

Andrew
0
 
LVL 4

Expert Comment

by:jtrifts
ID: 2627531
AGM and Andrew,

Isn't the problem on the forms side?  It seems from the question that ashishn already has set the disconnection from the database side but needs to kill the forms session.

THus the timer in the forms that is set slightly less than 40 minutes should be used to disconnect and close the application.

JT
0
 
LVL 4

Expert Comment

by:jtrifts
ID: 2627542
I think using the timer will be less work and easier to maintain than trying to handle a spontaneous ora 03113 error message...e.g. at what level would you try to trap that error in the client?

JT
0
 
LVL 2

Expert Comment

by:AndrewRodionov
ID: 2627581
Hi, JT!

At the form level. And for any form ;-)

Difine so called property class and set property in any form.

Andrew
0
 
LVL 1

Accepted Solution

by:
cheeku_76 earned 100 total points
ID: 2631756
hi !
u can set the time limit for the session to be there on the front screen and once
the sample code is
if(!session.isNew())
{
   Date stime=new Date(session.getLastAccessedTime());
   Date exptime=new Date(System.currentTimeMillis()-40*60*1000);

}
if(stime>=exptime)
{
     session.invalidate();
     //if required create a new session here
}

ii think this is one way to invaliadte session when the time lapses

bye
srikanth


0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question