For Programmers: Free Programming Magazines  


Home > Archive > Java Help > June 2005 > RMI Concurrent Requests Handled by Different Threads?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RMI Concurrent Requests Handled by Different Threads?
Reza

2005-06-10, 4:02 pm

Hi:

I was wondering if anyone knows the final word on concurrent requests'
thread assignment behaviour for Sun's implementation of the J2SE 1.4+
spec?

In other words, for the Sun implementation, do cuncurrent RMI method
call requests get handled by different thread instances or the same
one?

Does it matter if there is a thread pool or not?

The RMI spec is very vague in this area, so I want to know what the
predominant implementation does. It does not make sense that the same
thread instance will be running concurently, but I just want to make
sure

Also, is RMI thread pooling enabled by deafult in 1.4+?

Thanks in advance.

Reza

Esmond Pitt

2005-06-11, 3:58 am

Reza wrote:
> Hi:
>
> I was wondering if anyone knows the final word on concurrent requests'
> thread assignment behaviour for Sun's implementation of the J2SE 1.4+
> spec?
>
> In other words, for the Sun implementation, do cuncurrent RMI method
> call requests get handled by different thread instances or the same
> one?
>
> Does it matter if there is a thread pool or not?
>
> The RMI spec is very vague in this area, so I want to know what the
> predominant implementation does. It does not make sense that the same
> thread instance will be running concurently, but I just want to make
> sure


The RMI Spec is worded in such a way that you *cannot* assume that there
is only one thread in the server, or even that two successive RMI calls
from the same client thread are despatched in the same server thread
(although in fact in Sun's implementation the latter is often the case).
So, don't assume *anything* involving single threads. In any case any
single-threaded implementation of RMI would be entirely useless for
practical purposes, and I have never seen or heard of one.

> Also, is RMI thread pooling enabled by deafult in 1.4+?


Not in Sun's implementation. There is some thread pool code in
java.rmi.runtime but nothing uses it. Same in 1.5. I have heard that
other implementations do use thread pooling but have no information. If
Sun Java RMI ever does use thread pooling I would hope that it would use
java.util.concurrent, not the java.rmi.runtime stuff which doesn't even
seem complete.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com