• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: security manager in RMI

 
Rick Lu
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
How can I setup RMI if I cannot use a security manager ( like this: System.setSecurityManager(new RMISecurityManager()) ) ?
Here is from the instruction.html:

You must not require the installation of a security manager.

I saw Andrew said:

If you start the RMI Registry programatically (which means less work for the examiner / less for you to document) and ensure the client code already has the stub files then you will not need to set the codebase or set the security manager.

Anyone can explain this to me? I cannot understand it. What is "RMI Registry programatically"?
Regards.
Rick
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I setup RMI if I cannot use a security manager ( like this: System.setSecurityManager(new RMISecurityManager()) ) ?
Just don't set the security manager. Don't use any code that mentions a security manager. You still write the server code the same way, and the client still gets a remote reference using Naming.lookup() or LocateREgistry.getRegistry() and Registry.lookup(). Just try it and see what happens.
Anyone can explain this to me? I cannot understand it. What is "RMI Registry programatically"?
It means, if you start the RMI registry from within your program, rather than requiring the user to type "rmiregistry" or "start rmiregistry". You can call LocateRegistry.createRegistry() from within your program.
 
Rick Lu
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Jim.
I am gonna try. This sounds very interesting.
Regards.
Rick
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic