Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI questions

 
Jim Janssens
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some questions regarding the RMI server and the B&S assignment.
Quote from the assignment;


1.You must not require the use of an HTTP server.
2.You must not require the installation of a security manager.
3.You must provide all classes pre-installed so that no dynamic class downloading occurs.
4.You must use RMI over JRMP (do not use IIOP)



1&3. This means that if the stubs are not packaged they are getting downloaded from the https that runs together with the RMI registry ? So if you package the stubs with your jar file there is no http download. Or is it some flag that you explicitly must provide ? BUt what is the difference with 3 then ? Downloading the stubs from the https is dynamic class downloading no ? ...

2. But you must set the security manager to sun's default security manager no ? Otherwise you won't be able to run connect to the server from different machines ... ?

4. I supose it uses JRMP by default if you do not use the -IIOP flag with rmic ?

Finally, I see that there are two version flags for generating the stubs. -V1.1 (generates skeleton and stub) - V1.2 (generates only stub) . Currently my ant generates them with -V1.2 , is it better to use -V1.1 ? This case I'm sure ... or would that bring in other issues maybe ?

Thanks for reading !
 
peter wooster
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Koen Serneels:
I have some questions regarding the RMI server ...
...


What all of that means is that you must use the default RMI, your ANT defaults will be correct.
 
Jim Janssens
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. and what about the security manager ?

I tested the server & gui on different (networked) machines without setting anything of the security manager (just started the registry with .getRegistry and bound the service) . The communication went without any problems...

So can I conclude that not setting a security manager enables all access (from any machine) to the server ?

And when I would set this:

System.setSecurityManager(new RMISecurityManager());

I would need to edit the policy file first, before access is allowed ?

So basicly for the assignment, I would not set anything about the security manager (not even the default sun impl as stated above) ?
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11851
185
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Koen,
I tested the server & gui on different (networked) machines without setting anything of the security manager (just started the registry with .getRegistry and bound the service) . The communication went without any problems...

So can I conclude that not setting a security manager enables all access (from any machine) to the server ?
Correct.

Simple, isn't it?

Regards, Andrew
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic