public virtual IMessage SyncProcessMessage(IMessage reqMsg)
{
Object[] args = new Object[] { null, null };
IMessage replyMsg = null;
try
{
Message.DebugOut("\n::::::::::::::::::::::::: CrossContext Channel: Sync call starting");
IMessage errMsg = ValidateMessage(reqMsg);
if (errMsg != null)
{
return errMsg;
}
ServerIdentity srvID = GetServerIdentity(reqMsg);
Message.DebugOut("Got Server identity \n");
BCLDebug.Assert(null != srvID,"null != srvID");
BCLDebug.Assert(null != srvID.ServerContext, "null != srvID.ServerContext");
args[0] = reqMsg;
args[1] = srvID.ServerContext;
replyMsg = (IMessage) Thread.CurrentThread.InternalCrossContextCallback(srvID.ServerContext, s_xctxDel, args);
}
catch(Exception e)
{
Message.DebugOut("Arrgh.. XCTXSink::throwing exception " + e + "\n");
replyMsg = new ReturnMessage(e, (IMethodCallMessage)reqMsg);
if (reqMsg!=null)
{
((ReturnMessage)replyMsg).SetLogicalCallContext(
(LogicalCallContext)
reqMsg.Properties[Message.CallContextKey]);
}
}
Message.DebugOut("::::::::::::::::::::::::::: CrossContext Channel: Sync call returning!!\n");
return replyMsg;
}