aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes RMI questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "RMI questions" Watch "RMI questions" New topic
Author

RMI questions

Jim Janssens
Ranch Hand

Joined: Sep 24, 2004
Posts: 210
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

Joined: Jun 13, 2004
Posts: 1033
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

Joined: Sep 24, 2004
Posts: 210
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

Joined: Mar 28, 2003
Posts: 11460
    
  94

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


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMI questions