Meaningless Drivel is fun!
The moose likes Distributed Java and the fly likes RMI with Java 5 (Stubs + Security) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI with Java 5 (Stubs + Security)" Watch "RMI with Java 5 (Stubs + Security)" New topic

RMI with Java 5 (Stubs + Security)

Nikolay Gudovich

Joined: Jan 11, 2005
Posts: 12
Hello everybody!

I am studying Java RMI right now and it appears there are some differences between 1.1, 1.4 and 5.0 RMI. For example, generating stub and skeleton files with *rmic* are no longer required - "all stub classes are generated automatically, using the proxy mechanism" (Core Java 7th edition vol.2). From my personal experiment with RMI, the client and server don't need Blah_Stub.class anymore and the server doesn't need Blah_Skel.class.

The book, however, goes into detail of installing Security Manager for the client, but again from my personal experiment everything works fine without Security, provided the Remote interface is local to the client.

So I am really confused about what acutally happens under covers. All those stubs and skeletons are somehow "automatically generated" and stubs are handed to the client without any need for a security manager.

RMI technology creators tried to make it very easy to use, but with so much "automatic" stuff it gets too confusing for my taste.

Please help me understand RMI!!! Thanks a lot.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
Forget about stubs and skeletons. You no longer need to worry about them, all you need is an RMI registry, your RMI server, and the remote interface.

Everything else is now fully transparent and there's no need to know about its implementation.

I agree. Here's the link:
subject: RMI with Java 5 (Stubs + Security)
It's not a secret anymore!