Câu hỏi phỏng vấn Java
Câu hỏi

What is the purpose of using...

Câu trả lời

The purpose of using RMISecurityManager in Java RMI (Remote Method Invocation) is to enforce a security policy for RMI applications that use downloaded code, such as stubs for remote objects. The RMISecurityManager extends the standard SecurityManager class and provides additional security checks specifically for RMI operations.

However, it is important to note that the RMISecurityManager class has been deprecated and is no longer recommended for use. Instead, RMI applications should use the standard SecurityManager class or another appropriate SecurityManager implementation to enforce security policies.

The RMISecurityManager was responsible for overriding all of the relevant access-check methods from the SecurityManager class to ensure that stub objects were only allowed to perform class definition and class access operations. It was also necessary for enabling the downloading of classes from remote locations, as RMI's class loader would only download classes if a security manager had been set.

To summarize, the RMISecurityManager was used to:

  1. Enforce security policies for classes loaded as stubs for remote objects.
  2. Enable the downloading of classes from remote locations for RMI applications.
  3. Provide a layer of secur...
senior

senior

Gợi ý câu hỏi phỏng vấn

middle

What is the difference between GenericServlet and HttpServlet ?

middle

Is there anything like static class in Java?

middle

If an object reference is set to null , will the Garbage Collector immediately free the memory held by that object?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào