[omniORB] Beginner's question about corbaloc

Clarke Brunt clarke.brunt at yeomannavigation.co.uk
Mon Nov 15 11:35:39 GMT 2004


<fischer.c at atlas.de> wrote:

>Hi Duncan,
>
>thanks for clarifying this point. In chapter 11.6 'Servant IDL Type',
>Henning & Vinoski write that _default_POA() can be overriden to enable
>_this() to activate objects in a POA other than the root POA.
>But this seems only necessary if the object is not already activated.
>
>Where can i find further information on this topic? The POA chapter in
>the OMG CORBA specification doesn't say really much.
>
>Are you sure that what you say applies to other ORBs, too? I feel like
>having had this double activation problem with a quite old version of
>VisiBroker.

I've always used what is stated in the spec "C++ Language Mapping
Specification", as _this() is presumably specific to C++. The PDF I
downloaded from OMG (possibly out of date) is dated June 1999, and says it
aligns with CORBA 2.3.

Section 1.36.5 (Skeleton Operations) appears to say precisely what Duncan
said, with the addition that if you use _this() within a method invocation,
then you get "...the object reference for the target CORBA object it is
incarnating for that request.".

I hadn't previously appreciated the point that (outside a method
invocation), then if the servant only has a single activation, then you'll
get the object reference for that one (rather than possibly inadvertently
causing another activation in another POA). Relying on this sounds a bit
dodgy to me, as it would break if you happened some time later to have
multiple activations. Far better, if you are going to use _this(), and you
are using a POA other than the root POA, to implement _default_POA() to
return the one you want to use.

So: one would hope that what Duncan said applies to other ORBs too. As for
whether or not it does...

--
Clarke Brunt, Principal Software Engineer, Yeoman Navigation




More information about the omniORB-list mailing list