{
aom.add(objectId, servant);
}
catch (ObjectAlreadyActive e)
{
throw new POAInternalError("error: object already active (servant_to_id)");
}
catch (ServantAlreadyActive e)
{
/* it's ok, a nother one was faster with
activation (only occurs if unique_id is set) */
objectId = aom.getObjectId(servant);
}
orb.set_delegate(servant);
return objectId;
}
}
if (isUseDefaultServant() && servant == defaultServant &&
isInInvocationContext(servant))
{
/* objectId associated with the current invocation */
try
{
objectId = orb.getPOACurrent().get_object_id();
}
catch (org.omg.PortableServer.CurrentPackage.NoContext e)
{
throw new POAInternalError("error: not in invocation context (servant_to_id)");
}
return objectId;
}
throw new ServantNotActive();