}
catch (org.omg.CORBA.COMM_FAILURE ex)
{
if (retry_on_failure)
{
throw new RemarshalException();
}
else
{
//rethrow
throw ex;
}
}
}
catch ( SystemException se )
{
interceptors.handle_receive_exception( se );
throw se;
}
catch ( RemarshalException re )
{
// Wait until the thread that received the actual
// forward request rebound the Delegate
delegate.waitOnBarrier();
throw new RemarshalException();
}
ReplyInputStream reply = ( ReplyInputStream ) in;
ReplyStatusType_1_2 status = delegate.doNotCheckExceptions()
? ReplyStatusType_1_2.NO_EXCEPTION
: reply.getStatus();
switch ( status.value() )
{
case ReplyStatusType_1_2._NO_EXCEPTION:
{
interceptors.handle_receive_reply ( reply );
return reply;
}
case ReplyStatusType_1_2._USER_EXCEPTION:
{
ApplicationException ae = getApplicationException ( reply );
interceptors.handle_receive_exception( ae, reply );
throw ae;
}
case ReplyStatusType_1_2._SYSTEM_EXCEPTION:
{
SystemException se = SystemExceptionHelper.read ( reply );
interceptors.handle_receive_exception( se, reply );
throw se;
}
case ReplyStatusType_1_2._LOCATION_FORWARD:
case ReplyStatusType_1_2._LOCATION_FORWARD_PERM:
{
org.omg.CORBA.Object forward_reference = reply.read_Object();
interceptors.handle_location_forward( reply, forward_reference );
doRebind( forward_reference );
throw new RemarshalException();
}
case ReplyStatusType_1_2._NEEDS_ADDRESSING_MODE:
{
throw new org.omg.CORBA.NO_IMPLEMENT(
"WARNING: Got reply status NEEDS_ADDRESSING_MODE "