return handleWithRetry(cmd);
}
private Response handleInternal(CacheRpcCommand cmd) throws Throwable {
ComponentRegistry cr = cmd.getComponentRegistry();
CommandsFactory commandsFactory = cr.getLocalComponent(CommandsFactory.class);
// initialize this command with components specific to the intended cache instance
commandsFactory.initializeReplicableCommand(cmd, true);
try {
log.tracef("Calling perform() on %s", cmd);
ResponseGenerator respGen = cr.getComponent(ResponseGenerator.class);
Object retval = cmd.perform(null);
return respGen.getResponse(cmd, retval);
} catch (Exception e) {
log.trace("Exception executing command", e);
return new ExceptionResponse(e);