Killing a Client thread spawned by a WS call

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

Killing a Client thread spawned by a WS call

Postby tshepler » Fri Apr 09, 2010 1:17 am

Hi,
I am using a 4.04 Servoy server to service a small web service, more of a trigger, I update a record and trigger servoy to process it with a call via HTTP. All is working except that every time the call happens, a new client thread is spawned on the server, and will not go away. I am using an HTTPGET command to trigger the request, and thus there isn't anyway to "Close the browser"

Any tips on how to kill this thread? Aside from the admin page.

Thanks
tshepler
 
Posts: 23
Joined: Fri Feb 08, 2008 7:14 pm

Re: Killing a Client thread spawned by a WS call

Postby pbakker » Fri Apr 09, 2010 9:30 am

Need more information in order to be able to help out.

What are you using on the Servoy side? Servoy WebClient? Headless Client? Restful WebService plugin?

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: Killing a Client thread spawned by a WS call

Postby tshepler » Fri Apr 09, 2010 6:05 pm

I am using the webclient. I didn't work too hard at getting it up and running, I needed Servoy to process a request and this was the first trigger I thought of. I have the parent program call a HTTPGET with the url
'http://192.168.1.28:443/servoy-webclient/solutions/solution/LDAP_Get/method/LDAP_args/argument/'&Trim (Str (BS,'#9'))

It seems to work fine, it just doesn't close the client.
tshepler
 
Posts: 23
Joined: Fri Feb 08, 2008 7:14 pm

Re: Killing a Client thread spawned by a WS call

Postby pbakker » Mon Apr 12, 2010 10:33 am

A web client session remains active for 30 minutes (by default).

You can either do an application.exit() at the end of the method you're calling, or even better use the restfull Webservice plugin.

The advantage of the latter is that it uses a pool of headless clients to handle the incoming requests, to it means that there is no need to fire up a new web client session each time a webservice request comes in.

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands


Return to Web Development

Who is online

Users browsing this forum: No registered users and 3 guests