File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMISecurityManager

 
Michael Morris
Ranch Hand
Posts: 3451
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anyone out there ever got the impression that either no one really knows why the rmiregistry exhibits random flakiness or they're trying to keep the rest of us in the dark?
Everything that I've read says to install an RMISecurityManager on the server, nothing is ever said about nor have I seen any code to indicate that it is necessary to install an RMISecurityManager on the client. I just wrote a simple test application that will only run with the RMISecurityManager installed on the client (it doesn't matter whether you install one on the server or not.) The client runs fine if the remote object stub is in its CLASSPATH, but if it has to download the stub from the codebase, without the RMISecurityManager it throws a security exception. The server codebase is set to:http://localhost:8080/RMI/Server/ since I have Tomcat running on the local machine.
Can anyone give me (or guide me to) a definitive understanding of this?
 
James Du
Ranch Hand
Posts: 186
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Michael,
As what I understand, RMISecurityManager must be installed at the side which intend to download the stub class from the other. that applies to both sides despite its being server or client.
-James
 
Michael Morris
Ranch Hand
Posts: 3451
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yea James I'd pretty much figured that out. What upsets me is that of all the books I've read that covered RMI (I'm 100% self-taught in JAVA) which are four, some of the authors being Sun employees, not one nailed this issue down. None ever show the installation of a securtity manager on the client side, nor do they explain how RMI actually works. They just show you how to make the calls.
I've been programming for about 30 years and it always comes down to this: If you really want to understand something you just have to experiment with some code until you get it.
I do appreciate the information though.
Michael Morris
SCJP
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic