TimeOut on application programs

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

TimeOut on application programs

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:41 pm

by tyc >> Thu, 5 Dec 2002 10:05:39 GMT

Hi Jade Developers,

Need your advise on some techniques.
If user has not operated his/her computer for a certain time(Defined
by us), our system will enforce a user prompt Exit window to the user automatically regardless mouse and keyboard action.
This has some unforseen implications for us.
Are there ways to detect mouse or keyboard movements and delay this timeout functionality in Jade? [must like MSN going into "Away" after
a certain time period, and back online when there's mouse action]
Can anyone please advise on how to achieve this or which Windows API function can do it and how to code it?

Another part to this problem is that if the user invokes a Server operation and the time lapses, it SHOULD NOT log off the user, yet how
do we know that it's still running some long operation and not idle?

Advise appreciated and thanks

L.C. Lim

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: TimeOut on application programs

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:41 pm

by johnmunro >> Thu, 5 Dec 2002 20:57:45 GMT

We have implemented a feature which does more or less what I think you want, and using only Jade code. You start a timer, and on mouseMove of all controls put code to reset the timer. When the timer goes off, you bring up a screen which says "you will be logged off in 10 seconds" and has two buttons - "Logoff now" and "Continue working". Logoff now is obvious, Continue working restarts the idle timer and closes the window. If the warning window is open for 10 seconds, it exists the client.

The entire feature is optional, and the timeout settings are optional. We did this so that if someone went to lunch with our product open they wouldn't be using up one of the concurrent licenses.

John Munro

---
Synergist Limited - Home of FileVision
The Bioscience Innovation Centre
Cowley Road, Cambridge, UK
CB4 0DS

Telephone: +44 (0) 1223 478200
Fax: +44 (0) 1223 477969
Email: john.munro@filevision.com
Web: http://www.filevision.com

The contents of this communication are confidential and are only intended to be read by the addressee. We apologize if you receive this communication in error and ask that you contact Synergist Limited immediately to arrange for its return. The use of any information contained in this communication by an unauthorized person is strictly prohibited. Synergist Limited cannot accept responsibility for the accuracy or completeness of this communication as it is being transmitted over a public network. If you suspect this message may have been intercepted or amended, please inform Synergist Limited.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: TimeOut on application programs

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:41 pm

by torrie >> Fri, 6 Dec 2002 10:39:15 GMT

Just wondering if the mouse move has an impact on thin client performance, - Lots of messages every time the mouse is moved.

We do something similar, but don't rely on mouse move. When the application starts a timer is started which will start the shut down with a prompt when it fires. Every control event (with code behind it) calls a beginControl event method which resets the timers. If you were doing some long processing then you could end the timers before you start and then reset the timers when the processing ends. This does rely on the user interacting with the application.


There is also a connectionTimeout option in the JadeAppServer section of the ini file. (See InstallAdmin.pdf) which will disconnect the thin client if no messages have been received. The message which is displayed can be customised by changing the jadmsg.eng file. Not sure if this calls any of your application code.

Torrie

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: TimeOut on application programs

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:41 pm

by allistar >> Thu, 5 Dec 2002 22:15:16 GMT

An easy way to achieve this is to say: if the mouse has not moved in
10 minutes then exit.

You can easily get the current mouse position from Windows, which you would store on some transient object. Set a timer to fire every 10 minutes. When the timer fires see if the mouse is in a different
place. If not assume the client is inactive and shut them down.

Problems with this:
- relies on the mouse being moved. This feature will annoy keyboard
only users.
- if they happen to move the mouse to the exact same position it will think they haven't done anything.
- it won't catch them exactly every ten minutes. It could be up to
twice the timeout time before the system notices they have been
inactive.

Other than that it would be easy to implement.

If they are running a server execution method (I assume that's what
you mean by "server operation") then the timier event won't fire until the method finishes.

Regards,
Allistar.

------------------------------------------------------------------
Allistar Melville
Software Developer
Auckland, NEW ZEALAND

Greentree International,
Developer of Greentree Financial Software. ------------------------------------------------------------------


Return to “Tips and Techniques”

Who is online

Users browsing this forum: Bing [Bot] and 16 guests