• 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Clean client connection removal  RSS feed

Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I wondered if it is necessary an explicit client connections removal..
Is it UnicastRemoteObject.unexportObject() method call necessary for every
object that represents a client connection and that is exported by server ?

Or the objects are garbage collected automatically by Java when there are no references from the client ?

Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Liviu

I use this feature to disconnect my remote clients and I am not shore that the is really necessary but I don't know an other way to make a remote object unable to process remote requests.
The reason is that the client my still reamin active but its link with net is gone. If you see the Client like a GUI I then you can presume that after you close the GUI the garbage collector resolve the client related resources. But the client is more than UI, the UI use some client mechanisms.

What I try to say here is that the client needs an explicit log of feature and this feature can be triggered by the UI - but it is not necessary.

Consider the follow scenario, you can add a control layer which follows thee clients if a client does something wrong then it close its connection - but it still keep the client running.

Regards M
[ March 29, 2007: Message edited by: Mihai Radulescu ]
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!