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 RMI without webservers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI without webservers" Watch "RMI without webservers" New topic

RMI without webservers

Jared Cope
Ranch Hand

Joined: Aug 18, 2004
Posts: 243
Hi all,

Just wanted someone to confirm my understanding of RMI concerning the need for webservers.

Basically, I don't want to use them. So in order for this to happen, all I need to do is make sure that both server and client have all the necessary .class files they will ever need. In effect, I could just duplicate the application on both the client and server to make sure they are a copy of each other (including all the *_Stub.classes).

Then it's only the necessary network communication over port 1099 for the rmiregistry calls.

Please correct me as necessary.

Cheers, Jared.

SCJP 1.4 91%, SCJP 1.5 88%, SCJD B&S
Edward Harned
Ranch Hand

Joined: Sep 19, 2005
Posts: 291

You do not need webservers.

Look up codebase. You need not include all the classes on the client.

Each RMIServer establishes its own port for communication, so yes the default 1099 would no longer be needed after the initial registry call.

Ed's latest article: A Java Reactive Generator
Jared Cope
Ranch Hand

Joined: Aug 18, 2004
Posts: 243
Thanks for that.

Cheers, Jared.
I agree. Here's the link:
subject: RMI without webservers
It's not a secret anymore!