Hi all, I am very new to RMI and so I downloaded the code from Sun tutorial on RMI and try it out. And I am stucked at the last part. In that sun example..... what is meant by server. B'cas iam able to run rmiregistry. But what is this server and where it is?
Khad M SCJP2.0
Joined: Jan 30, 2002
Hi Khad, Since no one else is responding to your question, I'll take a crack at it even though I'm just a novice at RMI. My understanding of RMI is that esentially the rmiregistry creates a ServerSocket, usually on port 1099 and waits for connections. When you make a call to Naming.rebind() (or bind()) the registry then understands how to bind your remote service (interface) to requesting clients which are then assigned a communication Socket by the RMI server (registry). The port assigned is usually the next available port. Now the remote client can make calls on your bound interface. Basically the rmiregistry is implemeting a starndard TCP Socket protocol so you don't have to do that yourself. If I am mistaken on any of these points I hope some of the RMI gurus will let us both know. Hope this helps Michael Morris SCJP
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher