TCLUG Development Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RMI give you multi-threading?
I am struggling RMI and thread issues.
Is a remote service via RMI automatically multi-threaded?
Let's say there is a remote object that calculates PI to 1000 digits, lets
call it calculatePI().
If a single-threaded client #1 invokes the remote object's calculatePI(), I
know client #1 will block on that method until a result comes back.
So, we have client #1 waiting for calculatePI() to return and the remote
object is crunching on the result. What happens if single-threaded client #2
invokes calculatePI() ?
A. Does client #2 block waiting for client #1's request to complete?
B. Does the remote object accept client #2's request and start to process it (ie
multi-threads)?
My test programs seem to say A. is the case, but I cannot consistently
duplicate the behavior. Any insights?
--
Bob Tanner <tanner@real-time.com> | Phone : (612)943-8700
http://www.real-time.com | Fax : (612)943-8500
Key fingerprint = 6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9