// Is the tie already connected? If it is, check that it's
// connected to the same ORB, otherwise connect it.
ORB existingOrb = orb ;
try {
existingOrb = tie.orb();
} catch (BAD_OPERATION exc) {
// Thrown when tie is an ObjectImpl and its delegate is not set.
tie.orb(orb);
} catch (BAD_INV_ORDER exc) {
// Thrown when tie is a Servant and its delegate is not set.