This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of TensorFlow 2.0 in Action and have Thushan Ganegedara on-line!
See this thread for details.
Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Assignment Deliverables - Client persists or Not ?

Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do I really need to investigate upon transaction management? Like between Locking & Unlocking, am I supposed to check if client is alive or not ?
So does this kind of checking is expected in the assignment? Or its just optional part?
waiting anxiously,
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

You can go approach the project with client tracking. I've been at this part myself for the past little bit. From what I've gathered though, that is above and beyond the scope of the project. If you are using RMI this gets a little more difficult. An RMI server can't query a client. In order to take an approach with client ids and verifying their existence you would have to create the clients are rmi servers themselves. If you are using serialized sockets I belive tracking clients is not a problem. There's lots of discussion on the forum on this topic.
The way I took care of stale record locks was to when storing a record id as being locked, also store it in another hashmap along with the current time. Then on the server I created a low priority thread that awakens every 5 min, checks the lock times of all locked records and if any have been locked for 5 mins or more remove it. The question of how often to check for stale locks is an issue. 5 mins should be plenty, but is it too much?
Hope this is of some help.
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or you can use Unreferenced interface, to track dead clients.
But my understanding - you could say you do not care about that - it is not a part of assignment. Just document, that you do that and why (for example, you can't have appropriate command line arguments - I heard this one somewhere)
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic