• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Security manager needed?

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd forgotten this but, months ago, when I was still trying to get my RMI server running, I had to comment this out of the main mehtod of my server:

Coresponding code was commented out on the client-side. It runs great on my Win200 box without it. Is it necessary to set a security manager on the platforms I can't test on? Or more broadly, is there some reason I need to set a security manager that I just haven't yet come across?
Thanks,
Kirk Maze
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kirk, you do not need to have a security manager. If you did the only place that it works is on the client side. But you will also need a policy file. A Policy file can give allAccess to everything and it will work
Mark
 
Kirk Maze
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Mark!
I got so caught up with my code passing it's final threading tests, that I forgot the policy file completely, and might well have neglected to include one. What a pain that would have been.
I posted general thanks to you and Eugene and Peter on another thread. But in the event you miss it, THANKS!, it's probably not apparent to you how much you are helping guys like me who don't post much, but I'm nearly ready to submit a project that has an excellent design, and it's MUCH better than I could have done without the posts you three have made!
Thanks from all of us who mostly just read!
Kirk Maze
 
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, you don't absolutely need to have a client security policy file: e.g., unless you want to demonstrate the ability to download the RMI stub code, in which case you also likely needin your client startup, and your server startup will have to specify the codebase VM parameter:
 
Cowgirl and Author
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just adding another reinforcement to the fact that you do NOT need to do dynamic code downloading for your developer assignment. (Although it *is* the coolest thing ever).
So it's perfectly acceptable (unless your assignment tells you otherwise) to simply stick the stub in the client's classpath (stub and any other classes needed for arguments and return values passed across that aren't from the core API).
I just didn't want folks to fret too much if they're *not* using dynamic code downloading.
The key on the exam is do things in the simplest possible way that still implements the specification on the assignment, and follows good OO design, etc. Doing things more cleverly, or more advanced, at the expense of clear simplicity won't necessarily help and could even hurt.
Think of the exam assessor as the end-uesr, and your job is to make his or her life easier : )
cheers,
Kathy
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Kathy. That is a major point that you can learn in this assignment, is how not to make it overkill and try to build the Taj Mahal.
Many programmers in everyday life try to build too much than what is necessary or better yet asked of them.
TO the user they want what they ask for and they want it on time. By putting too much you have more chances of missing a deadline, or worse more bugs. Or in these parts Mosquitos.
Mark
 
Thomas Fly
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Of course, if you really want to understand RMI and eventually EJBs, it's more than just cool to implement downloadable stubs
 
Kathy Sierra
Cowgirl and Author
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Thomas Fly:
Of course, if you really want to understand RMI and eventually EJBs, it's more than just cool to implement downloadable stubs


OK, I'm not going to call EJB "more" than cool. But you're right, the "client-does-not-have-the-home-and-component-stubs" problem is the single biggest EJB mistake I've seen beginning EJBers make.
Now if you're talkin' Jini -- then NOW we're getting somewhere a whole lot more fun! And in my opinion, the best reason to learn to use dynamic code downloading.
Still, I wouldn't necessarily encourage one to learn it by using it IN your developer project, when you have so many other fish to fry.
Cheers,
Kathy
Sun's Bodgitt and Scarper division
 
Thomas Fly
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And I don't know that I'd encourage anybody to force the assessor to duplicate such a setup- but it's kind of nice to say, "And oh, by the way, if you WANT to download the stubs, remove those classes from the client .jar and start the server & clients like this..."
 
Ranch Hand
Posts: 2379
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did not use any security manager and its working well. As requirements does not specify, so i wanted to save time by not using policy file related staffs. Only used a suncertify.properties (not for security at all!).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic