Re: PortableServer_POA_activate_object_with_id



Hey,

On Fri, 21 Jun 2002, Marion Schuenemann wrote:

> Hi,
>
> thanks for your quick response.
>
> On Thu, Jun 20, 2002 at 12:17:44AM +0100, Mark McLoughlin wrote:
> > 	The ObjectKey is different from the ObjectId. The ObjectId is
> > used to find and Object within a POA and an ObjectKey contains the
> > information to find a POA within an ORB as well as the ObjectId.
> >
> > 	Thins of it like the ObjectId is a relative filename and the
> > ObjectKey is the full path for the Object.
>
> Ok, I see, but shouldn't there a way to set the ObjectKey, too?
> Or shouldn't the ObjectKey be equal to the ObjectId in case of
> PortableServer_USER_ID policy?

	No, its completely up to the POA what it puts into the
ObjectKey - it doesn't even have to put the ObjectId in theoretically.

> I ask because I want to use corbaloc to locate an object and for this
> I need to set the ObjectKey.
>
> In omniORBpy things works as follows:
>
> orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
> inspoa = orb.resolve_initial_references("omniINSPOA")
> rootpoa = orb.resolve_initial_references("RootPOA")
> servant = Hello()
> inspoa.activate_object_with_id("Test123", servant)
> print orb.object_to_string(inspoa.servant_to_reference(servant))
> inspoa._get_the_POAManager().activate()
> rootpoa._get_the_POAManager().activate()
>
> omniINSPOA is a poa with persistent object and user id policies.
>
> So, how can I do this with Orbit2?

	Basically, you want a Persistent object reference right? Well,
you can't at the moment. That's what kinda got me started hacking on
ORBit, but I got side-tracked :/

	If you look at ORBit2/test/poa/poatest-basic05.c you can see
how it should work. But as you can see that test case is disabled
because it doesn't work :-) I had a solution for ORBit-0.5.x at one
stage :

	http://mail.gnome.org/archives/orbit-list/2001-June/msg00025.html

	Although, God knows if I still have that patch anywhere. If
you're interested in doing the same thing for ORBit2, that'd be
brilliant and I'd help you the best I can ...

Good Luck,
Mark.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]