Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

rmi security problem : policy file

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have to bring myself here as the problem makes me crazy

I created a security manager in my RMI server simply use:

System.setSecurityManager(new RMISecurityManager());


Also, I have a fbn.policy file like:

grant {
permission java.security.AllPermission;
};


then I start my RMI server by specifying -Djava.security.policy=c:\...\fbn.policy. The server runs OK.
Now, my client side also has a line of:

System.setSecurityManager(new RMISecurityManager());


I run my client in the same PC with -Djava.security.policy=c:\...\fbn.policy. It doesn't work! Connection error comes out.
If I do not implement SecurityManager, everything is fine. What's the hell for this? Can anyone advise? Thanks.
Michael
 
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I run my client in the same PC with -Djava.security.policy=c:\...\fbn.policy. It doesn't work! Connection error comes out.
If I do not implement SecurityManager, everything is fine. What's the hell for this? Can anyone advise? Thanks.


The consensus in this group is that you should not use policy files, security managers, codebase or classpath settings, or dynamic downloading. These are the "extra features" that do not add much to your design, but they complicate things greatly for you and your accessor.
Eugene.
 
Don't touch me. And dont' touch this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic