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

System.gc()

 
Sai Prasad
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I set the reference to remote impl object at the client to null and called System.gc(). Immediately, Unreferenced() is invoked on the server side. I plan to implement this while user exits the system gracefully. I like to know what you feel about it. Thanks.
 
Krishna Varma Adluru
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems like a good solution;
I would go for it than "LeaseValue"
Regards,
Krishna
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is unnecessary but harmless. If the client exits gracefully, it should call db.close() anyway and it is immaterial when Unreferenced is called (as you have already been able to do your cleanup). If the client does not exit gracefully, well, you will only find out when the lease expires anyway.
- Peter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic