if(callbackContainer != null && callbackContainer.getCallbackHandler() != null)
{
Object[] params = param.getParameters();
Callback callbackRequest = (Callback) params[0];
Object obj = callbackContainer.getCallbackHandleObject();
if (obj != null)
{
Map callbackHandleObject = callbackRequest.getReturnPayload();
if(callbackHandleObject == null)
{
callbackHandleObject = new HashMap();
}
//We only want to add it if it is not null otherwise is a redundant operation
callbackHandleObject.put(Callback.CALLBACK_HANDLE_OBJECT_KEY,
obj);
callbackRequest.setReturnPayload(callbackHandleObject);
}
InvokerCallbackHandler callbackHandler = callbackContainer.getCallbackHandler();
callbackHandler.handleCallback(callbackRequest);