{
result.reg = RegistrationHelper.narrow( orb.resolve_initial_references("ImplementationRepository"));
}
catch( org.omg.CORBA.ORBPackage.InvalidName e)
{
throw new INTERNAL("unable to resolve ImplementationRepository: " + e.toString());
}
boolean non_exist = true;
if (result.reg != null)
{
try
{
non_exist = result.reg._non_existent();
}
catch (org.omg.CORBA.SystemException e)
{
non_exist = true;
}
}
if (non_exist)
{
throw new INTERNAL("Unable to resolve reference to ImR");
}
return result;
}