• 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

is there a way to free the RMI object after calling the remote method?

 
Ranch Hand
Posts: 595
6
jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

i have an RMI application using simple rmi call, just passing few params to server and everything is looking fine. recently i was running it in eclipse in debug mode and i saw a strange thing. whenever i was calling this remote method, a new thread was being created, named "Selector Thread". Now i know that i am not creating it, and i just don't know how to stop it from being created. I am using a single global RMI object, there is no multiple remote interface object creation, it is just the call. is this normal?

is there a way to stop new threads from being created or the old one to simply stop or destroy itself?

thanks
 
Ranch Hand
Posts: 291
Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
RMI Servers handle multiple requests concurrently. The way it is done is with threads. Each new request runs in either a new thread, or it re-uses an existing thread. The RMI Runtime will destroy old threads after awhile.

There is a lot of information on exactly how this works on the internet. Just search.
 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@ravi, why do you think this is a problem?

I assume you are using RMI for a school project and not for something real. RMI is a bad protocol, and should not be used for modern production programs.
 
s ravi chandran
Ranch Hand
Posts: 595
6
jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Pat Farrell wrote:@ravi, why do you think this is a problem?

I assume you are using RMI for a school project and not for something real. RMI is a bad protocol, and should not be used for modern production programs.



well, unfortunately, it is part of an antique production software. I have to use RMI as their complete software is working on RMI. the issue is from the testing team, they are bugging me asking about this additional threads. I don't see this threads impacting the performance of my application, but they don't believe me..

 
reply
    Bookmark Topic Watch Topic
  • New Topic