// Note: the inputObject may be null if an error occurs
// in request or before _invoke returns.
// Note: self may be null also (e.g., compiler generates null in stub).
MessageMediator messageMediator =
orb.getInvocationInfo().getMessageMediator();
if (messageMediator != null)
{
if (messageMediator.getConnection() != null)
{
((CorbaMessageMediator)messageMediator)
.sendCancelRequestIfFinalFragmentNotSent();
}
// Release any outstanding NIO ByteBuffers to the ByteBufferPool
InputObject inputObj = messageMediator.getInputObject();
if (inputObj != null) {
inputObj.close();
}
OutputObject outputObj = messageMediator.getOutputObject();
if (outputObj != null) {
outputObj.close();
}
}