@GET
 @Path("/lock/{process}/{token}")
 public void lock(@PathParam("process") String processName, @PathParam("token") String token) {
   UUID tokenUuid;
   try {
     tokenUuid = UUID.fromString(token);
   } catch (Exception e) {
     final String errMsg = "[" + token + "] doesn't seem a valid UUID";
     throw new SynchronizerServiceException(SynchronizerServiceException.Status.ERROR, errMsg);
   }
   LoggableSynchronizer synchronizer = instanceManager.getSynchronizer();
   try {
     synchronizer.lock(processName, tokenUuid);
   } catch (AlreadyLockedSynchronizerException e) {
     throw new SynchronizerServiceException(
         SynchronizerServiceException.Status.LOCKED, e.getMessage());
   } catch (WrongTurnSynchronizerException e) {
     throw new SynchronizerServiceException(
         SynchronizerServiceException.Status.WAIT, e.getMessage());
   } catch (SynchronizerException e) {
     throw new SynchronizerServiceException(
         SynchronizerServiceException.Status.ERROR, e.getMessage());
   }
   throw new SynchronizerServiceException(
       SynchronizerServiceException.Status.OK, "[" + processName + "] locks");
 }