Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ready to submit - need last minute help

 
Matthew Comer
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm working on the final packaging of my assignment, but have one final question.
I'm using RMI, but I'm packaging the stubs & skeletons with the server and the stubs with the client, so I have no need for the RMIClassLoader and dynamic class downloading. Therefore, I do not require the rmi.server.codebase property, etc. HOWEVER, I'm wondering about the security policy file. In all of my testing both my client and server startup and run just fine without specifying a policy file - I would expect this since I'm not loadiing any class files remotely. However, I have a co-worker who claims that his server required a policy file to start properly (something about a security exception when binding to the rmiregistry or some such). I have not seen this behavior, but I'm concerned.
Can someone advise?
Thanks!
Matt Comer
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I kind of have your same thoughts. However, I do not use an RMISecurityManager in my server, however, I do use one in my client. In my case also, I could have everything run fine without it in either place. I am always starting java with a policy file though, just in case.
Mark
 
Matthew Comer
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gee, the sheer number of responses has me overwhelmed... grin
 
Trevor Dunn
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you install a new rmi security manager on the server you are going to need a policy file. If you do not install a new security manager you do not need it. At least this was my experience with it.
Trevor
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic