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.
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.
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.
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)
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.
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.
lesouef:
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
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)
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.
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:
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.
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.
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