[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jacorb-developer
Subject:    Re: [jacorb-developer] Skeleton._poa() raises Exceptions
From:       Gerald Brose <brose () inf ! fu-berlin ! de>
Date:       2000-12-20 13:26:06
Message-ID: 3A40B36E.F09FA39 () inf ! fu-berlin ! de
[Download RAW message or body]

Hi,

the operations _poa() and _object_id() can only be invoked
from within the context of an operation, i.e. from code that
was actually invoked in the course of an operation execution
by the POA. In your example code, this is not the case.

Regards, Gerald Brose.

"Schmidmeier, Arno" wrote:
> 
> Hi,
> Whenever I call Skeleton._poa() I recieve following exception:
> 
> org.omg.CORBA.OBJ_ADAPTER: org.omg.PortableServer.CurrentPackage.NoContext
> minor code: 0  completed: No
>         at jacorb.orb.ServantDelegate.poa(ServantDelegate.java:129)
>         at org.omg.PortableServer.Servant._poa(Servant.java:30)
> 
> What I did during the Creation of the CORBA Object is following:
> ORB.init()
> POA=ORB.resolveInitialRefferences("ROOTPOA")
> servant=new ObjectImplementation()
> POA.activate_servant(servant)
> servant._poa()
> 
> If I execute Servant._id_object() I get following message:
> org.omg.CORBA.OBJ_ADAPTER: org.omg.PortableServer.CurrentPackage.NoContext
> minor code: 0  completed: No
>         at jacorb.orb.ServantDelegate.object_id(ServantDelegate.java:146)
>         at org.omg.PortableServer.Servant._object_id(Servant.java:34)
> 
> I got the impression from a short look in the source, that this exception is
> caused by the fact that
> jacorb.orb.ORB returns null in any case if current() is called.
> 
> A workaround for Servant._poa is currently
> servant._get_delegate().default_POA(servant)
> 
> What I try to do is to deactivate the corresponding CORBA object for a given
> Servant. (I do not know the POA which the Servant is in).
> So I thought about following sequence:
> poa=servant._poa()
> obj_id=servant.object_id()
> poa.deactivate_object_with_id(obj_id)
> 
> Arno
> 
> P.S. I am working with JacORB 1.2.3
> 
> *************************************************************************
> *************************************************************************
> Arno Schmidmeier
> 
> Sirius
> Simplicity out of complexity
> 
> Arno.Schmidmeier@sirius-eos.com
> Phone 0049/89/ 61 36 76-37
> Fax 0049/89/ 61 36 76-33
> 
> _______________________________________________
> jacorb-developer maillist  -  jacorb-developer@lists.spline.inf.fu-berlin.de
> http://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer

--
Gerald Brose,                       Mail:       brose@inf.fu-berlin.de
FU Berlin        (for PGP key see:) http://www.inf.fu-berlin.de/~brose
Institut f. Informatik              Ph-one:        (++49-30) 838-75112
Berlin, Germany                     Ph-ax:         (++49-30) 838-75109

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic