File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Distributed Java and the fly likes About UnicastRemoteObject Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "About UnicastRemoteObject" Watch "About UnicastRemoteObject" New topic

About UnicastRemoteObject

Rick Charles

Joined: Jul 27, 2006
Posts: 25
What does a UnicastRemoteObject do ? And also how to connect the database using RMI ?
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

A UnicastRemoteObject is the super-class from which you extend RMI "server" objects.

And also how to connect the database using RMI ?

You connect to a database in an RMI program the same way you would in any other program (Which is a question for either the JDBC or the J2EE forums...). If you're asking how you connect to a database *using* RMI - that's not what RMI is used for...

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Jaime M. Tovar
Ranch Hand

Joined: Mar 28, 2005
Posts: 133
RMI is about a java object calling a java object in a distinct environment (and many other fancy things). You have to create a DAO object (jdbc) and call it from a RMI enabled object.

She will remember your heart when men are fairy tales in books written by rabbits.<br /> As long as there is duct tape... there is also hope.
Neerav Narielwala
Ranch Hand

Joined: Dec 08, 2006
Posts: 106
The UnicastRemoteObject class defines a non-replicated remote object whose references are valid only while the server process is alive. The UnicastRemoteObject class provides support for point-to-point active object references (invocations, parameters, and results) using TCP streams.

Objects that require remote behavior should extend RemoteObject, typically via UnicastRemoteObject. If UnicastRemoteObject is not extended, the implementation class must then assume the responsibility for the correct semantics of the hashCode, equals, and toString methods inherited from the Object class, so that they behave appropriately for remote objects.

<a href="" target="_blank" rel="nofollow">Java Tutorials</a> | <a href="" target="_blank" rel="nofollow">Java Weblog</a> | <a href="" target="_blank" rel="nofollow">Computing Articles</a>
I agree. Here's the link:
subject: About UnicastRemoteObject
It's not a secret anymore!