• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Requirement for an assignment - one doubt !

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a doubt, regarding the requirements ...
It states clearly ,
" The remote client code that you write must provide all
the public methods of the suncertify.db.Data class. "
In that case,
1. I will have to write implementation for each public method
at client side ?
Or otherwise,
2. just give a call to these public methods over server from client
side ?
I feel 2nd case is logical... Still I dont want to take a risk !
with regards,
Shivaji.
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It can be either. 1. would be the case if you chose to use the Adapter pattern, 2. if you would create a Remote object that implemented the Data interface.
- Peter
 
Shivaji Bhosale
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am naturally looking at 2nd option. In which I'll be having DataInterface extends Remote having all public methods within Data class declared.
Data will implement this Remote interface.
From my client, I will simply give a call to these, lock , unlock etc public methods from Data class which is a remote object got after Lookup.
I guess this makes sense. Please ...let me know if I interpreted wrong.
 
Peter den Haan
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Shivaji Bhosale:
Data will implement this Remote interface.

Everything looks alright, except this statement. Data itself should not implement any interface which extends java.rmi.Remote! Examine the contract for Remote as specified by the javadoc; it should only be implemented by real remote objects.
- Peter
 
I've never won anything before. Not even a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic