• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Modify or Extends Data class

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mark and other guys:
In my implementation, I just modify the deprecated methods in Data class and add a little codes to verify the database file in his constructor.
I think the Data object is functional and effictively,I donot want to modify his main function, so create a new Remote Class have a reference refer to the Data object, I impletments the lock/unlock,findCriteria method in my remote oject.
Maybe means I had modified the Data class, but could somebody tell me its advantage and disadvantage??
Thanks!
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I did both, modified the Data class adding the searching functionality and extended it like you did for Remote connections and added my locking here. In my opinion this is a logical approach, because you have to distinguish local and remote connections. Local clients do not need any locking implementation, remote clients do. In my extended class I modified the lock/unlock signatures to support client identification. I guess Sun had no problem with this solution, I passed with 149.
Hope this helps...
jay
------
SCJP
SCJD
 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jay,

I did both, modified the Data class adding the searching functionality and extended it like you did for Remote connections and added my locking here


You mean in your RemoteDataAccess you have a reference refer to the Data object?
 
Popeye has his spinach. I have this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic