Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is an object exported..??  RSS feed

 
James Turner
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a small question about exported objects. If I start my RMI Server it exports the Remote objects and bounds them to the RMI Registry. Is it possible to check if a specified Remote object is currently exported or not?

The purpose of this is to be able to specify if a Remote object is accessible via RMI without having to try to connect and getting errors.

I couldn't seem to find any isExported() methods in the RMI API's. Does anyone know any ways of achieving this?

Any help would be greatly appreciated.

Thanx,

James.
 
Carr Onstott
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All remote objects need to be exported before they are bound into an RMI Registry. You should not be binding objects into a registry that are not exported.

I dont fully understand your problem. Is your client retrieving entries from an RMI Registry that arent exported and therefore it cannot make a connection?
 
James Turner
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From my knowledge of RMI an exported object is able to service requests via RMI for any clients. The RMI Registry is simple there as a means of looking up the RMI server in the first place (JNDI in J2EE).

If an RMI server was unbound from the registry, this means that no new clients can look up the server anymore, but existing clients can still access the RMI server and perform requests.

If you were to unexport an RMI Server object it will then be unable to service existing or new client requests, weather it's bound to the RMI Registry or not.

Is my thinking correct?

Thanx for your help.

James.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!