Release client license at end of web visit

Hi

I have embedded a Servoy web client form into a static, existing web site - it all works as expected. One concern is that as the site has a fair number of visitors (3-400) hits an hour and is going to suck up a large number of client licenses. There is a definite start and end point to Servoys involvement with this site and I was wondering if there is a way to close the Servoy client for example on submission of the form. I have had a good look and there is nothing obvious, in Lasso or ColdFusion I would simply close the session, but this does not seem possible from Servoy - have I missed something ?

Cheers
Gordon

Can’t you change the timeout for a webclient (don’t know myself, sorry).
If so you could make it like ‘0’…

IT2Be:
Can’t you change the timeout for a webclient (don’t know myself, sorry).
If so you could make it like ‘0’…

Thanks Marcel - I will give it a go and I guess I could shorten the session in TomCat to say 5 mins. The problem this would present however is that for other sites using the same server you could truncate sessions that by nature need to be a lot longer ie large forms etc.

Fundamentally even with a CPU license it would be nice to close off the Servoy clients programatically when they are no longer required.

Fundamentally even with a CPU license it would be nice to close off the Servoy clients programatically when they are no longer required.

I think you are ‘fundamentally’ ( :) ) right!

I would add a feature request to the support system (not ours)…

Have you tried login out and closing the solution through scripting?

Paul

This seems to do the trick - using the ‘_self’ format replaces the Servoy WebClient screen with whatever webpage you’ve selected and avoids confusion.

if ( vBtn == 'Exit' )
{
	application.showURL('http://www.servoy.com/', '_self');
	application.exit()
}

I have same kind of problem, but the above doesn’t to help.

I have a webclient and the user closes the browser.

The licenses are being hold by these clients that are not online anymore.
I received mail from my server that I was out of licenses.

I’ve found 1 client IP-address with 5 licenses in use (user started 5 times a webclient in a new browser), but after testing, the PC was restarted.

So there were no more clients in use on that PC.
But in the Servoy Server Administration the 5 licenses were still in use.

Is there a way, that I can interrupt the close of the browser, so that I can do a security.logout()

I tried in the solution settings onClose method, but that doesn’t seem to work in webclient.

Or is there some setting in Servoy that releases clientlicenses after a certain time?

There is no way to prevent a browser from being closed by the user and no way to trigger code when the user does, unfortunatly.

But, the client sessions will be cleaned up after a certain period. Default it’s 30 minutes, but you can change that interval in the Tomcat webserver that Servoy runs.

Paul

OK, but these 30 minutes it that the time that a session can live or is that the time that a client didn’t do any action.

I need that last situation. A sesion can take more than 30 minutes, but if a client doesn’t respond during 10 minutes I want to release it

Offcourse the session will live when the user is activly using it.

Only when there is no activity, the timeout timer starts running.

pbakker:
Offcourse the session will live when the user is activly using it.

Only when there is no activity, the timeout timer starts running.

  1. Where is the timeout timer in Servoy or Tomcat ?

  2. Is it possible to test for connected idle clients in Servoy and close them ?

  3. Can you limit the number of web client connections and if so put them into some sort of holding pattern waiting for a license to come free ? eg you are X in the queue of Y please call back or wait for …mins

  4. Can you report on stats of 3 eg waiting clients and hence generate sales of licenses for Servoy!!!

I know 3 and 4 are pretty unlikely to happen but if I were new to Servoy and looking to the potential of the WebClient I would want to be sure that my customers were not going to arrive to an error page when I launch my new super duper system simply because I did not have sufficient licenses!!

Gordon

Gordon:

pbakker:
Offcourse the session will live when the user is activly using it.

Only when there is no activity, the timeout timer starts running.

  1. Where is the timeout timer in Servoy or Tomcat ?

server/conf/web.xml

look for:

<session-config>
        <session-timeout>30</session-timeout>
    </session-config>
  1. Is it possible to test for connected idle clients in Servoy and close them ?

Yes.
Have a look at the great Robot plugin from Scott Butler: Free Robot Plug-In Released - #15 by sbutler - Classic Servoy - Servoy Community

  1. Can you limit the number of web client connections and if so put them into some sort of holding pattern waiting for a license to come free ? eg you are X in the queue of Y please call back or wait for …mins

Yes, but it would be quite complex, you can use the robot plugin to check for remaining licenses and keep one license always free, then when a user connects you check if it’s using the latest license and log out the user after storing some sort of key. Upon log out of the user you should redirect him to a special html page with a redirect that tries to log back in every x mins using the supplied key as argument to a startup method. The startup method should check a table and decide which client should be allowed first based on the key. Instead of the key you could also use the client ip address.
Difficult but doable.

  1. Can you report on stats of 3 eg waiting clients and hence generate sales of licenses for Servoy!!!

I know 3 and 4 are pretty unlikely to happen but if I were new to Servoy and looking to the potential of the WebClient I would want to be sure that my customers were not going to arrive to an error page when I launch my new super duper system simply because I did not have sufficient licenses!!

Gordon

Yes, it all depends on the way you implement the queue table and the key system.