// initialize this command with components specific to the intended cache instance
commandsFactory.initializeReplicableCommand(cmd, true);
try {
if (trace) log.tracef("Calling perform() on %s", cmd);
ResponseGenerator respGen = cr.getResponseGenerator();
if(cmd instanceof CancellableCommand){
cancelService.register(Thread.currentThread(), ((CancellableCommand)cmd).getUUID());
}
Object retval = cmd.perform(null);
Response response = respGen.getResponse(cmd, retval);
log.tracef("About to send back response %s for command %s", response, cmd);
return response;
} catch (Exception e) {
log.trace("Exception executing command", e);
return new ExceptionResponse(e);