[omniORB] Multi-threaded clients
Gary D. Duzan
gdd0@gte.com
Mon, 07 May 2001 19:30:25 -0400
In Message <Pine.LNX.4.33.0105071608020.23140-100000@gatesofhell.measurecast.com> ,
Robert Huffman <rhuffman@measurecast.com> wrote:
=>
=>We're having a problem with multi-threaded Java clients connecting to a
=>C++ OmniORB server. To build the Java client, we use the idl2java
=>compiler provided with Sun's JDK.
=>
=>It appears that any call to the server will block all the other threads
=>that are trying to call the server. So, despite the fact that OmniORB
=>provides multi-threading, the Sun JDK doesn't take advantage of the fact.
=>(It isn't difficult to imagine that the code generated by Sun's idl2java
=>compiler synchronizes all server calls on the save object.)
=>
=>So, while this isn't really an OmniORB question, I'm hoping someone out
=>there has experienced this problem and discovered a workaround. I'll be
=>happy to provide a small test case if anyone is interested.
It probably is an omniORB question, actually. OmniORB uses a
thread-per-connection model, so if the client ORB sends all its
requests over a single connection (as I suspect is happening in
your case) they will all be handled by the single server thread,
effectively serializing them. OmniORB-to-omniORB communication
deals with this by starting new connections when existing ones are
busy, resulting in more server threads and more parallelism. I
understand the threading behaviour may be changing for omniORB 4,
but others closer to the development can address that.
Gary Duzan
Verizon IT