Basically, my question is about how the server (remote object) serves the request?
Let's say one server is running all time waiting for requests coming in. When a client invokes one remote method through the remote object reference obtained by Naming lookup, what actually happen on server side? The method is running in the server's VM (correct me if i am wrong)'s memory space? What if many requests come in at the same time, the server spawn new threads for those requests? (Even the server is not implemented explicitly as multi-thread one?) Or RMI provides some queuing mechanism for the requests?
In the RMI specification, one possible place about this (maybe i misunderstand it) is in 3.2 as :
"A method dispatched by the RMI ru ntime to a remote object implementation
may or may not execute in a separate thread. The RMI runtime makes no
guarantees with respect to mapping remote object invocations to threads. Since remote method invocation on the same remote object may execute
concurrently, a remote object implementation needs to make sure its
implementation is thread-safe."
what actually does this mean?
i am puzzled by thinking this problem, wish someone can get me off the hook!