[omniORB] Problem with Creating object with simple object keys
Duncan Grisby
dgrisby@uk.research.att.com
Mon, 26 Nov 2001 17:29:15 +0000
On Monday 26 November, Arup Choudhury wrote:
> CORBA::ORB_var orb = CORBA::ORB_init( argc, argv, "omniORB3" );
> CORBA::Object_var obj = orb->resolve_initial_references( "omniINSPOA"
> );
> PortableServer::POA_var ins_poa = PortableServer::POA::_narrow( obj );
>
> MyObject_i * myObj = new MyObject_i();
> PortableServer::ObjectId_var myMetroBuilderInterfaceid =
> ins_poa->activate( myObj );
>
> I am getting a CORBA exception in activate() call. Please let me know what I
> am doing wrong.
The INS POA has the USER_ID policy (that's the whole point of it!) so
you have to use activate_object_with_id().
Cheers,
Duncan.
--
-- Duncan Grisby \ Research Engineer --
-- AT&T Laboratories Cambridge --
-- http://www.uk.research.att.com/~dpg1 --