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 Lubos Pochman <lp...@insightful.com> on 2002/08/01 02:12:23 UTC
Problem with multiple threads using XML-RPC WebServer on Linux
Hi,
I implement a method in the RPC server using JNI.
XML-RPC WebServer starts multiple threads (10 by default).
I need to initialize (only once) the JNI method(C++ package) before using it.
That doesn't cause any problem on Windows and Sun,
because they use "real" threads, but Linux implements each thread as separate process
(I see 10 server processes running when I start one server).
I execute the initialization once (in initial WebServer thread), but the other threads
are not initialized and fail (actually the JNI method hangs).
I tried to limit the number of threads by calling XmlRpc.setMaxThreads(1), but
it doesn't seem to help, there are still 10 processes (servers) running.
Thanks for your help, Lubos