• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB Lookup at runtime

 
Pradeep Kadambar
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a design wherein a central Manager under which several controllers exist. The contollers and the manager have EJB interfaces through which they communicate. The problem is that contollers can be installed arbitrarily on different machines.

So I would send the EJB remote reference to the manager which will use it to communicate. But when I invoke operations on the controller EJB remote I get java.rmi.NoSuchObjectException: no such object in table.
 
Sachin K Deshmukh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The RMI client has to be prepared to handle this exception by re-acquiring the stub.
NoSuchObjectException usually occured if a stub for a remote object is used after the remote object has exited. This is a problem of a 'stale' reference, i.e. premature unexport.

The table concerned is an internal RMI table mapping remote object IDs (as represented in stubs and incoming calls) to currently exported remote objects.

-Sachin Deshmukh
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!