*/
public String processCall(String payload) throws SerializationException
{
// Normal processing
//
RPCRequest rpcRequest = null;
try
{
// Decode request
//
rpcRequest = RPCCopy.getInstance().decodeRequest(payload, this.getClass(), this);
// Invoke method
//
HibernateRPCHelper.parseInputParameters(rpcRequest, _beanManager,
getThreadLocalRequest().getSession());
Object returnValue = RPCCopy.getInstance().invoke(this, rpcRequest.getMethod(),
rpcRequest.getParameters(),
rpcRequest.getSerializationPolicy());
returnValue = HibernateRPCHelper.parseReturnValue(returnValue, _beanManager);
// Encode response
//
return RPCCopy.getInstance().encodeResponseForSuccess(rpcRequest.getMethod(),
returnValue,
rpcRequest.getSerializationPolicy());
}
catch (InvocationTargetException e)
{
return RPCCopy.getInstance().encodeResponseForFailure(rpcRequest.getMethod(), e.getCause());
}
catch (IncompatibleRemoteServiceException ex)
{
return RPCCopy.getInstance().encodeResponseForFailure(null, ex);
}