// create the object reference
poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
org.omg.CORBA.Object obj = poa.id_to_reference( "Object".getBytes() );
ParsedIOR pior = new ParsedIOR( getORB(), orb.object_to_string(obj));
// Now create number two.
final ORB orb2 = (org.jacorb.orb.ORB)getAnotherORB(orbProps);
rootPOA = (POAHelper.narrow( orb2.resolve_initial_references( "RootPOA" )));
// Create a child POA
poa = rootPOA.create_POA
(
"TestServerPOA",
rootPOA.the_POAManager(),
new Policy[]
{
rootPOA.create_lifespan_policy( LifespanPolicyValue.TRANSIENT),
rootPOA.create_id_assignment_policy( IdAssignmentPolicyValue.USER_ID)
}
);
poa.the_POAManager().activate();
// create the object reference
poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
obj = poa.id_to_reference( "Object".getBytes() );
ParsedIOR pior2 = new ParsedIOR( orb2, orb2.object_to_string(obj));
assertTrue
(
! (CorbaLoc.parseKey( pior.get_object_key()).equals
(CorbaLoc.parseKey( pior2.get_object_key())))
);
}