Deeplink and client license

Forum to discuss the Web client version of Servoy.

Deeplink and client license

Postby derk.hulshof » Wed Nov 12, 2014 11:46 am

Hi all,

I am using a deeplink call to our Servoy application server. Now one deeplink call uses one license, after 30 minutes the session times out and the license can be used again.
Is there a (or what is the best) way to kill the license after the deeplink call completes.
Because I dont need a session after the deeplink code, some sort of client kill license code or logout.

Tnx in advance
Derk
derk.hulshof
 
Posts: 87
Joined: Tue Dec 03, 2013 9:18 am
Location: Netherlands

Re: Deeplink and client license

Postby mboegem » Wed Nov 12, 2014 9:41 pm

Hi Derk,

If you just start this session in order to perform a specific task and you can kill it afterwards there might be some ways:
- include an 'application.exit()' after the task has been performed
- use the UserManager plugin to set a short idle time time-out on the session (servoy-plugins.de)
- maybe start using a restful web service to call in order to get your task performed.

Maybe you can give some more information of what the session you call with the deep link should do.
This can improve quality of answers to your problem.
_____________________
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance SAN Developer

Image
User avatar
mboegem
 
Posts: 1382
Joined: Sun Oct 14, 2007 1:34 pm
Location: Hoofddorp, The Netherlands

Re: Deeplink and client license

Postby derk.hulshof » Thu Nov 13, 2014 9:18 am

hi Marc,
Tnx for the reply
I am using, this kind of link:
{serverUrl}/servoy-webclient/ss/s/{solutionName}/m/{methodName}/a/{value}/varA/{value1}/varB/{value2}

The code is creating a record based on information from another system.
The other information system is triggering the deeplink based on an event in that information system.

The URL above is executed and running for about 2 seconds.
After that it is idle.

Servoy 7.3.1
Hope this will help
derk.hulshof
 
Posts: 87
Joined: Tue Dec 03, 2013 9:18 am
Location: Netherlands

Re: Deeplink and client license

Postby derk.hulshof » Thu Nov 13, 2014 10:24 am

I have tried the application.exit()
it is given me a NullPointerException, below. What am I missing here. session init or something else?
The weird part is, that it is ending the session.

2014-11-13 09:22 http-8080-3 ERROR com.servoy.j2db.util.Debug Error while performing startup method: [methodName]
java.lang.NullPointerException
at com.servoy.j2db.FormManager.makeSolutionSettings(FormManager.java:392)
at com.servoy.j2db.server.headlessclient.WebFormManager.makeSolutionSettings(WebFormManager.java:78)
at com.servoy.j2db.FormManager$1.run(FormManager.java:168)
at com.servoy.j2db.server.headlessclient.EventsRunnable.run(EventsRunnable.java:58)
at com.servoy.j2db.server.headlessclient.WebClient.executeEvents(WebClient.java:552)
at com.servoy.j2db.server.headlessclient.WebClientsApplication$7.respond(WebClientsApplication.java:576)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1287)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1358)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1465)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
at com.servoy.j2db.server.servlets.Zt.doGet(Zt.java:10)
at org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
derk.hulshof
 
Posts: 87
Joined: Tue Dec 03, 2013 9:18 am
Location: Netherlands

Re: Deeplink and client license

Postby mboegem » Thu Nov 13, 2014 5:04 pm

Looks like it's stopped before it's even started...

Anyway, based on what you describe: start using a web service.
That'll take up 1 license in your server, but it's designed to do exactly the job you described.
_____________________
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance SAN Developer

Image
User avatar
mboegem
 
Posts: 1382
Joined: Sun Oct 14, 2007 1:34 pm
Location: Hoofddorp, The Netherlands

Re: Deeplink and client license

Postby derk.hulshof » Mon Nov 17, 2014 3:11 pm

tnx Marc, for the input.
Will dive into it.
derk.hulshof
 
Posts: 87
Joined: Tue Dec 03, 2013 9:18 am
Location: Netherlands

Re: Deeplink and client license

Postby lesouef » Sun Dec 07, 2014 4:54 pm

the session timeout can be set for the current session to any value you like, using the unsupported servoy code on github.
module=svyWebClientUtils, method=setSessionTimeout

if you need all your users to use the same timeout, change the tomcat timeout, much easier. the only drawback is that if the user closes the nav window, he'll have to login again.
and this is there for a Windows server, adapt if other OS:
...\Servoy7\application_server\server\conf\web.xml
look for the section next, don't use 0 as this is interpreted as ever..., it's in minutes, that fixes pretty well the web licence pb. not 100% bullet proof if the client nav crashes, etc...
but improves the situation really well.

<session-config>
<session-timeout>1</session-timeout>
</session-config>
lesouef
 
Posts: 420
Joined: Thu Oct 20, 2005 8:13 pm
Location: Strasbourg & Paris - France

Re: Deeplink and client license

Postby Harjo » Mon Dec 08, 2014 9:38 am

lesouef wrote:the session timeout can be set for the current session to any value you like, using the unsupported servoy code on github.
module=svyWebClientUtils, method=setSessionTimeout


where and I how do you set this??
Harjo Kompagnie
Direct ICT / Servoy Hosting / ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
User avatar
Harjo
 
Posts: 4269
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Deeplink and client license

Postby lesouef » Mon Dec 08, 2014 11:29 am

https://github.com/Servoy/svyUtils
once you get the zip, use the required module in your app by placing it in your workspace, and you'll get a few extra functions, among which the one you need.
note this is a bit old, and it will need some mods if you want the syntax checker to be silent under 7.4.2 (depends on your params of course)
lesouef
 
Posts: 420
Joined: Thu Oct 20, 2005 8:13 pm
Location: Strasbourg & Paris - France

Re: Deeplink and client license

Postby paronne » Thu Dec 11, 2014 2:05 pm

Hi lesouf, good tip for the webclient session.

I may correct instead that svyUtils is supported as the other modules on the Servoy GitHub account.
There is a specific section to create issues: https://github.com/Servoy/svyUtils/issues.
No issue has been created so far.

note this is a bit old, and it will need some mods if you want the syntax checker to be silent under 7.4.2 (depends on your params of course)


Which version of svyUtils and which version of Servoy are you using ? the first release 1.0.0 has been published few weeks ago. There should be only 1 warning in this release, on the the svyLogManager scope.

Regards
paronne
 
Posts: 85
Joined: Fri Nov 02, 2012 3:21 pm

Re: Deeplink and client license

Postby goldcougar » Tue Dec 16, 2014 9:28 pm

Seems like the WebClient isn't really what you need. If there is no UI to present to the user, and you just need to trigger a Servoy Method, use the RESTful web services instead.
So, instead of: {serverUrl}/servoy-webclient/ss/s/{solutionName}/m/{methodName}/a/{value}/varA/{value1}/varB/{value2}

use: {serverUrl}/servoy-service/rest_ws/{solutionName}/{formName}/{value1}/{value2}
Then on the form {formName}, create a function like:

Code: Select all
function ws_read(arg1, arg2){
   //do your stuff
   //then return
   return {success: true}
}


The advantage here is in the {serverUrl}/servoy-admin/plugin-settings , under RESTful Web Services Plugin, you can adjust the pool of clients you'd like to use to control how many can be open at once. For example, these settings would tell it to use as many as it needs, but once it doesn't need them any more, close them and only keep 1 open to handle new requests.
Code: Select all
rest_ws_plugin_client_pool_exhausted_action: grow
rest_ws_plugin_client_pool_size: 1
Scott Butler
iTech Professionals, Inc.
SAN Partner

Servoy Consulting & Development
Servoy University- Free Training Videos
Servoy Guy- Free Plugins, Tips & Resources
ServoyForge- Open Source Servoy Components
User avatar
goldcougar
Servoy Expert
 
Posts: 657
Joined: Sun Jan 08, 2006 7:15 am
Location: Cincinnati, OH

Re: Deeplink and client license

Postby lesouef » Wed Dec 17, 2014 12:01 pm

answer for paronne: I tried that back in february. and I can't see any indication of version in this...
and for the original question, yes if not user interaction is needed, using a web service is better. I also use this with max clients set to 4.
but if you need the user to show a new window every 3mn, then you'll have to take care of the time out.
why opening a new nav window every 3 mn? because this is launched by a tel call dispatching system which issues the Url for the current call and wait for the window to close (or process to close if you like) to process with the next call.
lesouef
 
Posts: 420
Joined: Thu Oct 20, 2005 8:13 pm
Location: Strasbourg & Paris - France

Re: Deeplink and client license

Postby paronne » Fri Jan 02, 2015 12:30 pm

Hi lesouef, i understand the misunderstanding here.

I tried that back in february. and I can't see any indication of version in this...


svyUtils and all the other svy modules were under development back in January. Most of them have been released now and shortly there will be a new release for svyUtils.
You can always checkout the latest updates from the 'develop' branch or download the release from https://github.com/Servoy/svyUtils/releases
paronne
 
Posts: 85
Joined: Fri Nov 02, 2012 3:21 pm

Re: Deeplink and client license

Postby slesouef » Fri Jan 02, 2015 12:43 pm

ok, no problem, I'll do if I ever need this again.
as far as I am concerned, the general time out for tomcat has been enough so far.
slesouef
 
Posts: 3
Joined: Thu Jul 10, 2014 9:09 am


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 4 guests