Regards, George
SCJP, SCJD, SCWCD, SCBCD
Originally posted by Jim DiCesare:
Is a security manager needed? The exam says you must not require installation of a security manager, but should I use one and not require it?
Restrictions on RMI
To avoid unnecessary complexity in the marking environment certain restrictions are placed on solutions that use RMI. Specifically:
You must not require the use of an HTTP server.
You must not require the installation of a security manager.
You must provide all classes pre-installed so that no dynamic class downloading occurs.
You must use RMI over JRMP (do not use IIOP)
Is there a difference in using Naming.rebind instead of java.rmi.registry.Registry.bind? Can I always just use rebind instead of trying to bind first?...I just read an interesting paragraph.."starting the RMI registry in the wrong directory (i.e., it needs to be started in the root directory above our package structure--...
I hope this is my problem.
Regards, George
SCJP, SCJD, SCWCD, SCBCD
Originally posted by George Marinkovich:
on the client side:
(DataAccess) Naming.lookup(url) and handle all the exceptions you can get
from this method: AccessException, MalformedURLException, etc
where the URL I'm using is:
"rmi://" + host + ":" + port + "/" + REMOTE_OBJECT_NAME
- George
Originally posted by Jim DiCesare:
Is there a difference in using Naming.rebind instead of java.rmi.registry.Registry.bind? Can I always just use rebind instead of trying to bind first?...I just read an interesting paragraph.."starting the RMI registry in the wrong directory (i.e., it needs to be started in the root directory above our package structure--...
I hope this is my problem.
Marco Tedone<br />SCJP1.4,SCJP5,SCBCD,SCWCD
As you can see, am confused of the purpose of "host". Can anyone please explain what exactly "host" meant? And do we need to use it to setup a server?
Sometimes when IP is used as host, I think it tries connects to that particular IP machine and lookup. But what if a host name is provided?
Marco Tedone<br />SCJP1.4,SCJP5,SCBCD,SCWCD
Originally posted by Satish Avadhanam:
As you can see, am confused of the purpose of "host". Can anyone please explain what exactly "host" meant? And do we need to use it to setup a server? My understanding is that we create a registry and rebinds the object at the server side and at the client side we lookup it using the url as stated by George. But I cannot understand what "host" stands for. Sometimes when IP is used as host, I think it tries connects to that particular IP machine and lookup. But what if a host name is provided?
Regards, George
SCJP, SCJD, SCWCD, SCBCD
As far as my understanding, I think this is all we have to do for binding and looking up of service.
I do not completely understand of how to co-relate with the statement given by you "the hostName (and port) contained in the URL defines the registry, while the human-readable-name defines the server's name registered with the naming service." to above example.
Here server name is "Server_Machine", but what is hostName? Is it the same as server name?
From what you said "An host name is a human-readable representation of an IP address.", can you please tell me how a machine's name is related to host name?
human-readable-name defines the server's name registered with the naming service.
Marco Tedone<br />SCJP1.4,SCJP5,SCBCD,SCWCD
I am not young enough to know everything. - Oscar Wilde This tiny ad thinks it knows more than Oscar:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|