N
narke
i am learning rmi. after read the tutorial and specification, some
thing come up to confuse me: to get a stub, one on client has to rmic
from a concrete remote
class. this seems unreasonable since i think the stub should only
depends the remote interface instead of any underlying concrete class.
image the case that a client got a batch of servers to access (up to
the user choice in the runtime), each of those servers running a remote
object which implemented a common public interface. so in this
circumstance, one should reasonablly suppose that the client should be
cooperative with any server object for the simple reason that their
interface are same.
by the rmi specification, howver, a stub was generated from the
concrete remote class, so for n different remote classes, we simply get
n different stubs, and i consequencely have to put all those stubs on
the client side. is it true? Even i like to do so, i am afraid that the
Naming.loopup(...) will be confused for it would definitely find there
are so many stubs for an interface, how does it know which one should
to pick up?
-
narke/[email protected]
thing come up to confuse me: to get a stub, one on client has to rmic
from a concrete remote
class. this seems unreasonable since i think the stub should only
depends the remote interface instead of any underlying concrete class.
image the case that a client got a batch of servers to access (up to
the user choice in the runtime), each of those servers running a remote
object which implemented a common public interface. so in this
circumstance, one should reasonablly suppose that the client should be
cooperative with any server object for the simple reason that their
interface are same.
by the rmi specification, howver, a stub was generated from the
concrete remote class, so for n different remote classes, we simply get
n different stubs, and i consequencely have to put all those stubs on
the client side. is it true? Even i like to do so, i am afraid that the
Naming.loopup(...) will be confused for it would definitely find there
are so many stubs for an interface, how does it know which one should
to pick up?
-
narke/[email protected]