[omniORB] CORBA::NO_PERMISSION exception when destroying POA policy objects

David Riddoch djr@uk.research.att.com
Thu, 25 Nov 1999 11:32:36 +0000 (GMT)


On Wed, 24 Nov 1999 Wil_Evers@doosys.com wrote:

> I'd like to report a strange problem I ran into while testing the
> omniORB3.0 snapshot dated November 19.
> After creating a POA, I attempted to call CORBA::Policy::destroy() on the
> policy objects in the associated policy list, which resulted in a
> CORBA::NO_PERMISSION exception. I assume this is because the newly created
> POA doesn't want me to destroy the policy objects it is depending on.

<snip>

> Is this a bug in the omniORB3.0 snapshot, or am I perhaps missing
> something?

A bug.  I didn't read the spec carefully enough.  Actually the POA doesn't
need the policy objects after the call to create_POA(), so they can safely
be destroyed.  I have put a fix into the CVS repository -- get it after
tonights update.

Incidentally, the destroy operation (for policy objects) is actually a
no-op in omniORB.  I delete the object when the reference count goes to
zero -- it makes no different whether or not you call destroy().  For
portablility though it is probably a good idea to destroy them, I just
think it makes the code really ugly.

Cheers,
David