You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rpc-user@xml.apache.org by Simon Hardy-Francis <si...@isv-gmbh.de> on 2002/06/03 10:25:50 UTC

Re: How to stop receiving requests?

Dear Kenny,

A possible solution is to write a small "stub" method on your server which handles all XML RPC calls. The stub method would then be responsible for the serialization and calling the destination method(s) by using a switch statement or using reflection.

I do this by having just one method publically available as my stub. It takes one argument which is a hierarchical Hashtable structure. In the structure I can specify multiple destination methods and parameters to call. The single parameter passed back from the stub method is also the same structure which is handy because then results from multiple calls etc can also be passed back. This is great for passing back blocks of data to, say, a PHP web client. Scripting languages like PHP or Perl have native support for accessing hierarchical structures--unlike Java.

Maybe this has given you some inspiration.

Simon

> Hi All.
> 
> My virgin posting to the list.
> 
> I have an xmlrpc server set up, and it receives big chunks of data via remote calls. Because the call handling is multithreaded, I can receive more calls than I can really handle. The memory usage goes up until I eventually run out of memory. How can I guard against this? Is there a way to get the server to serialize its requests instead of running them in parallel?
> 
> Thanks!
> 
> -Kenny