Preventing 2 smart client sessions on same computer

Questions, tips and tricks and techniques for scripting in Servoy

Preventing 2 smart client sessions on same computer

Postby chico » Fri Aug 05, 2011 5:23 am

Is there an easy way to prevent a user from launching a 2nd smart client session on a computer which is already running one?

We've found that users often launch a new session without realizing they already have one running.

Thanks

Chico

And no, getting rid of the user will not solve our problem. :D
--------------------------------------------
Servoy Version: 6.0.3
DB: MySQL 5.1
Win XP/Vista/7 - Java 5u20 / 6u22
OS X - 10.6.5 - Java 5/6 update 3
chico
 
Posts: 271
Joined: Tue Nov 20, 2007 6:34 am

Re: Preventing 2 smart client sessions on same computer

Postby ROCLASI » Fri Aug 05, 2011 5:56 am

chico wrote:And no, getting rid of the user will not solve our problem. :D

Aww...I just wanted to say "replace user and hit any key to continue..." ;)


Anyway, you can add some unique user info on the server and check it when a solution opens/logs in using the following functions.
application.addClientInfo(string)
application.getClientCountForInfo(string)

So you can set some unique user/machine specific info on the server and using the count to see if it already exists and act accordingly.
Of course all this only works when the client has a solution open.

Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to Methods

Who is online

Users browsing this forum: No registered users and 36 guests

cron