This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Jacques Bosch
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ken Krebs
Ranch Hand
Posts: 451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jacques Bosch
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I supplied the user with 2 JCheckBoxes, 1 for "Case Sensitive" and 1 for "Exact".
 
Jacques Bosch
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK. Yeah, that seems safest to me too.
Cheers!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic