if (request instanceof ConnectionFactoryCreateConnectionDelegateRequest)
{
//Create connection request
ConnectionFactoryCreateConnectionDelegateRequest cReq =
(ConnectionFactoryCreateConnectionDelegateRequest)request;
String remotingSessionId = cReq.getRemotingSessionID();
ServerInvokerCallbackHandler callbackHandler = null;
synchronized(callbackHandlers)
{
callbackHandler = (ServerInvokerCallbackHandler)callbackHandlers.get(remotingSessionId);
}
if (callbackHandler != null)
{
log.debug("found calllback handler for remoting session " + Util.guidToString(remotingSessionId));
cReq.setCallbackHandler(callbackHandler);
}
else
{
throw new IllegalStateException("Cannot find callback handler " +
"for session id " + remotingSessionId);