if (orb.subcontractDebugFlag) {
dprint(".marshalingComplete->: " + opAndId(messageMediator));
}
CDROutputObject cdrOutputObject = (CDROutputObject) outputObject;
//
// Create server-side input object.
//
ByteBufferWithInfo bbwi = cdrOutputObject.getByteBufferWithInfo();
cdrOutputObject.getMessageHeader().setSize(bbwi.byteBuffer, bbwi.getSize());
final ORB inOrb = orb;
final ByteBuffer inBuffer = bbwi.byteBuffer;
final Message inMsg = cdrOutputObject.getMessageHeader();
CDRInputObject cdrInputObject = AccessController
.doPrivileged(new PrivilegedAction<CDRInputObject>() {
@Override
public CDRInputObject run() {
return new CDRInputObject(inOrb, null, inBuffer,
inMsg);
}
});
messageMediator.setInputObject(cdrInputObject);
cdrInputObject.setMessageMediator(messageMediator);
//
// Dispatch
//
// REVISIT: Impl cast.
((CorbaMessageMediatorImpl)messageMediator).handleRequestRequest(
messageMediator);
// InputStream must be closed on the InputObject so that its
// ByteBuffer can be released to the ByteBufferPool. We must do
// this before we re-assign the cdrInputObject reference below.
try { cdrInputObject.close(); }
catch (IOException ex) {
// No need to do anything since we're done with the input stream
// and cdrInputObject will be re-assigned a new client-side input
// object, (i.e. won't result in a corba error).
if (orb.transportDebugFlag) {
dprint(".marshalingComplete: ignoring IOException - " + ex.toString());
}
}
//
// Create client-side input object
//
cdrOutputObject = (CDROutputObject) messageMediator.getOutputObject();
bbwi = cdrOutputObject.getByteBufferWithInfo();
cdrOutputObject.getMessageHeader().setSize(bbwi.byteBuffer, bbwi.getSize());
final ORB inOrb2 = orb;
final ByteBuffer inBuffer2 = bbwi.byteBuffer;
final Message inMsg2 = cdrOutputObject.getMessageHeader();
cdrInputObject = AccessController
.doPrivileged(new PrivilegedAction<CDRInputObject>() {
@Override
public CDRInputObject run() {
return new CDRInputObject(inOrb2, null, inBuffer2,