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

SecurityManager in RMI

Mathew Sam
Ranch Hand

Joined: Dec 19, 2001
Posts: 124
If dynamic classloading is not required do i need to install securty manager in my server program or in client program.
What about policy file
Michael Ernest
High Plains Drifter

Joined: Oct 25, 2000
Posts: 7292

A security manager is required for any VM that downloads executable (Java) code from another source -- doesn't matter if it's a "client" or a "server," as these terms just describe the process' role in one relationship. If I have a program that is remotely available to a client, but also uses another program as a remote source, then that program is both a "server" and a "client," respectively.
Policies describe the actions allowed for each server codebase. Even if you're only going to load one stub from one RMI server, you need a policy for that. Even if you want to give all possible server sources all possible permissions, you need a policy that says that; it must be explicit.
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
[This message has been edited by Michael Ernest (edited December 30, 2001).]

Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Mathew Sam
Ranch Hand

Joined: Dec 19, 2001
Posts: 124
Thanks for the reply
I understand what you said.

So if i am not using dymanic classloading in RMI i need not install a security manager or need not use a policy file.
I agree. Here's the link:
subject: SecurityManager in RMI
It's not a secret anymore!