Forums Register Login

Question about DVDConnector in SCJD Exam book

+Pie Number of slices to send: Send
I am trying to understand the DVDConnector class in the SCJD Exam book. I think the static method getRemote() would be used by the (GUI) client to connect to the (database) server.

What I don't understand is the inclusion of the line RegDVDDatabase.register() inside this method which is called by the client. It seems that this would start up the RMI registry. But, is it desirable to start up the RMI registry on the client machine (assuming the client and server are on separate machines)? I would think that you only want to start up the RMI registry on the server machine.

Does this sound right?
+Pie Number of slices to send: Send
Hi Lara

But, is it desirable to start up the RMI registry on the client machine (assuming the client and server are on separate machines)? I would think that you only want to start up the RMI registry on the server machine.

You are correct - normally you would only want a registry on the server machine.

However the reference version of the RMI registry provided with the JDK does not allow remote registration of services. So if you wanted to set up services on both computers (for example having the server push updates to the client), then you might want to also have a registry on the client machine (I think there are easier ways to achieve this, but I am too lazy to turn on another computer to test this ).

Regards, Andrew
Whose rules are you playing by? This tiny ad doesn't respect those rules:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 463 times.
Similar Threads
RMI Server becoming unreferenced
RMI: Creation of Remote Objects??
RMI problem
URLBirdy: RMI Question
RMI Testing
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 02:16:38.