aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes NX: Binding / server object / stub (Ken again...) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "NX: Binding / server object / stub (Ken again...)" Watch "NX: Binding / server object / stub (Ken again...)" New topic
Author

NX: Binding / server object / stub (Ken again...)

Jacques Bosch
Ranch Hand

Joined: Dec 18, 2003
Posts: 319
Hi Ken.
In one of your posts you wrote:

RemoteServicesImpl extends UnicastRemoteObject and implements RemoteServices. It has 2 parts, the implementation of RemoteServices (i.e. the 2 Services methods) and static getServices methods that allow the clients to get a Services instance that is either an RMI server for the Network Server application functionality or its stub for the Network Client application functionality.

I don't understand the bit in bold.
How do you mean it reterns a "RMI server for the Network Server application functionality"?
I simply do this when starting the RMI registry:

Isn't the stubbing handled automatically by RMI? I.E. I bind remoteDBServices on the server side, but when the client requests it, a stub is returned.
Anyway, my app is working fine, I just want to understand what you meant.
Or do you mean you just put those to things: binding the server, and getting the stub, inside static methods?
Thanx again.
Jacques


Jacques<br />*******<br />MCP, SCJP, SCJD, SCWCD
Ken Krebs
Ranch Hand

Joined: Nov 27, 2002
Posts: 451
Or do you mean you just put those to things: binding the server, and getting the stub, inside static methods?

Yes. I put them in the RemoteServicesImpl class. Keep in mind that I did this only because the rmi requirements of my app are simple. If they were more complex with many server/stub combinations that were interconnected, I would probably relocate these methods to some sort of class that manages my rmi connections.


kktec<br />SCJP, SCWCD, SCJD<br />"What we observe is not nature itself, but nature exposed to our method of questioning." - Werner Heisenberg
Jacques Bosch
Ranch Hand

Joined: Dec 18, 2003
Posts: 319
Ken, thanx for clearing that up for me.
Just another quick question - for somebody who passed....
Concerning the "exact match" issue in the instructions for the find functionality on the GUI:
I know you gave a case sensitive option, but did you allow e.g. "Fred" to return "Freddy"? Or did the user have to enter the full "Freddy" to get "Freddy"?
From this topic:
http://www.coderanch.com/t/183562/java-developer-SCJD/certification/Find-requirement-seems-inconsistent-Help
Ken Krebs
Ranch Hand

Joined: Nov 27, 2002
Posts: 451
I supplied the user with 2 JCheckBoxes, 1 for "Case Sensitive" and 1 for "Exact".
Jacques Bosch
Ranch Hand

Joined: Dec 18, 2003
Posts: 319
OK. Yeah, that seems safest to me too.
Cheers!
 
wood burning stoves
 
subject: NX: Binding / server object / stub (Ken again...)