Re: POA Destruction problems...

Dion Picco <[email protected]>
Newsgroups gmane.comp.corba.orbacus
Organization IONA | Making Software Work Together TM
Message-ID <[email protected]>
Hi Andy,

On Tue, Sep 14, 2004 at 02:26:32PM -0700, Andy Beard wrote:
> Hi,
> I'm experiencing some confusion regarding the proper destruction of 
> PERSISTENT POAs.  The main problem is that we routinely shutdown and 
> restart applications using persistent POAs in order to integrate 
> implementation changes.  The question I have is whether or not I should 
> call destroy() on these persistent POAs prior to shutdown.  We 
> definitely do not wish to invalidate any client side references to 
> servants incarnated in these POAs, however if I call destroy on the 
> encompassing POA, OBJECT_NOT_EXIST exceptions are raised to the client 
> when invoking requests prior to process termination but post POA 
> destruction.  This is confusing because when the client is restarted, a 
> new persistent POA is instantiated and used to incarnate the CORBA 
> object once again (and subsequently OBJECT_NOT_EXIST is no longer 
> raised), however the client has been misled into thinking the object is 
> permanently invalidated.  It seems to me that OBJECT_NOT_EXIST should 
> not be raised when destroying persistent POAs unless the object is 
> explicitly deactivated as well.  Just because the POA was destroyed 
> doesn't mean the object itself was destroyed as well,  Correct?  As a 
> possible solution, I could simply transition the POA Manager to INACTIVE 
> when exiting my applications and never explicitly destroy persistent 
> POAs.  Is this a viable solution?
> 
> Thanks ahead of time,
> 
>     ~Andy

If you have destroyed your POAs, your client application will receive
OBJECT_NOT_EXIST exceptions in response to requests.  This is the
behaviour outlined in section 11.2.6 of the CORBA specification (second
paragraph).  If the ORB cannot find the correct POA, it cannot deliver
the request to that POA and hence as far as the client is concerned, the
object doesn't exist.

NOTE: Even though the servant continues to exist within
the process space of your server, there isn't a POA to deliver the
requests; hence the ORB cannot deliver the request to an object and it
assumes that it doesn't exist.

If you are fully shutting down your server, I would expect you to
receive a TRANSIENT exception since there isn't anything listening for
requests (POAManagers).  However, if only the POAs are destroyed, then
the OBJECT_NOT_EXIST is the exception you will receive.  If you are
destroying and recreating POAs only (instead of restarting servers), you
should transition your POAManagers into a holding or discarding state
perhaps.  Or, like you mention, you are receiving requests between POA
destruction and process termination, you should first transition the
POAManager to a discarding/holding state before destroying the POAs.  

Cheers.

-- 
Dion Picco, Software Engineer
IONA Technologies Inc.
Team Orbacus - Your CORBA Source
mailto:[email protected]
http://www.orbacus.com
_______________________________________________
OB-Users Mailing List - [email protected]
http://mail.ooc.nf.ca/mailman/listinfo/ob-users
Visit our support FAQ before you send a message.
http://www.orbacus.com/faq/support.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.