• 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

how to make sure rmi object is exported

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any way I can make sure that an object has been exported when I called UnicastRemoteObject.exportObject(Stub,0)?

I'm having some cases when running the server apps with no exception, but sometimes the exported object is not found by the client, therefore producing this:

RemoteException
java.rmi.NoSuchObjectException: no such object in table

please help?
 
Ranch Hand
Posts: 62
Ruby Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are sevaral forums discussing the topic. The reason to that is that the object on the server has been garbage collected like stated in the forums. To avoid this you have to hold a reference to the object. Details you can find e.g. at sun's forum, Stackoverflow or here.
 
Ranch Hand
Posts: 247
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you put the RemoteObject in rmiregistry using Naming or Registry bind() or rebind() methods?... Using exportObject() means that the Object is eligible to be placed in Naming service...
 
reply
    Bookmark Topic Watch Topic
  • New Topic