File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Distributed Java and the fly likes RMI Question: Is server a thread? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI Question: Is server a thread?" Watch "RMI Question: Is server a thread?" New topic
Author

RMI Question: Is server a thread?

Lakshmi Priya Gopal
Greenhorn

Joined: Mar 28, 2012
Posts: 3
Hi

I'm new to Java RMI so forgive me if this sounds too basic. What happens when I call the Registry.bind method? The documentations say that an object is created and bound to the port number specified, the object is an instance of a class, so does RMI basically create a thread for the class and makes it listen to the port for incoming connections?

I don't understand the concept of object here very well, am hoping someone could shed some light on this.

Thank you!
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

Well technically, for the remote object in question, the object becomes a remote object (i.e. the server) when it is exported & not when it is bound to a registry.
I will recommend to read sun RMI tutorials to understand the concepts.


apigee, a better way to API!
pravin venkat
Greenhorn

Joined: Mar 30, 2012
Posts: 20
--> the remote node needs to referenced in one way or other and hence stored in registry with an arbiter name

--> the purpose of an object here is to provide with methods using which you
bind(bind a remote object with a name as a reference),
rebind(update binding made with a name as reference),
unbind(remove a bind with a name as reference),
lookup(peek into the registry for bindings with a name reference) and
list(display all the binding entries)
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4637
    
    5

Lakshmi Priya Gopal wrote:I don't understand the concept of object here very well, am hoping someone could shed some light on this.


The concept of an object here is the same as anyplace else in Java. An object is a handle to a bundle of values and methods.

Why are you starting to learn RMI? Its not a good solution to any known problem. It and CORBA were interesting experiments in the 90s, but both failed.
Lakshmi Priya Gopal
Greenhorn

Joined: Mar 28, 2012
Posts: 3
Pat Farrell
It is for a class project, that I need to implement using RMI. I am able to understand how it works now, after referring to documentation on the internet.
Thank you for the help guys!
pravin venkat
Greenhorn

Joined: Mar 30, 2012
Posts: 20
Lakshmi Priya Gopal wrote:Pat Farrell
It is for a class project, that I need to implement using RMI. I am able to understand how it works now, after referring to documentation on the internet.
Thank you for the help guys!


Well, join the club.. even i had the same for my class project.. learn them in an conceptual way.. they have less regard these days..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMI Question: Is server a thread?
 
Similar Threads
How can I get ServerSocket port number?
port field
RMI connection problem
Multi-threaded RMI server