Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RMISecurityManager vs. SecurityManager

Tags:

java

security

rmi

According to the Java API documentation,

RMISecurityManager implements a policy that is no different than the policy implemented by SecurityManager. Therefore an RMI application should use the SecurityManager class or another application-specific SecurityManager implementation instead of this class.

If this is the case, then what is the point of having a separate RMISecurityManager class? Are there any situations where it should be used over SecurityManager?

like image 902
visual-kinetic Avatar asked Oct 15 '25 16:10

visual-kinetic


1 Answers

There is no point. If you look at the definition of RMISecurityManager:

public class RMISecurityManager extends SecurityManager {

    /**
     * Constructs a new <code>RMISecurityManager</code>.
     * @since JDK1.1
     */
    public RMISecurityManager() {
    }
}

It really does nothing. My guess is that it exists for historical reasons. You never really gain anything by using it.

like image 97
Sami Koivu Avatar answered Oct 18 '25 07:10

Sami Koivu