Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

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

 
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
 
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:
https://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!
 
Always! Wait. Never. Shut up. Look at this tiny ad.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!