private function execute($str_method, ProtocolMessage $obj_request, ProtocolMessage $obj_response)
{
try {
ApiProxy::makeSyncCall('datastore_v4', $str_method, $obj_request, $obj_response, 60);
$this->obj_last_response = $obj_response;
} catch (ApplicationError $obj_exception) {
$this->obj_last_response = NULL;
if ($obj_request instanceof RunQueryRequest && 'GQL not supported.' === $obj_exception->getMessage()) {
$this->executeGqlAsBasicQuery($obj_request);
// recursive
} elseif (FALSE !== strpos($obj_exception->getMessage(), 'too much contention') || FALSE !== strpos($obj_exception->getMessage(), 'Concurrency')) {
// LIVE: "too much contention on these datastore entities. please try again." LOCAL : "Concurrency exception."
throw new Contention('Datastore contention', 409, $obj_exception);
} else {
throw $obj_exception;
}
}
return $this->obj_last_response;
}