// Thus, this method must call returnServant if it returns null.
public ServantObject servant_preinvoke(org.omg.CORBA.Object self,
String operation,
Class expectedType)
{
ObjectAdapter oa = oaf.find( oaid ) ;
OAInvocationInfo info = null ;
try {
info = servantEnter( oa ) ;
info.setOperation( operation ) ;
} catch ( OADestroyed ex ) {
// Destroyed POAs can be recreated by normal adapter activation.
// So just reinvoke this method.
return servant_preinvoke(self, operation, expectedType);
}
try {
try {
oa.getInvocationServant( info );
if (!checkForCompatibleServant( info, expectedType ))
return null ;
} catch (Throwable thr) {
// Cleanup after this call, then throw to allow
// outer try to handle the exception appropriately.