Examples of LockException


Examples of javax.jcr.lock.LockException

            AbstractLockInfo info = (AbstractLockInfo) element.get();
            if (info != null && (element.hasPath(path) || info.deep)) {
                Node lockHolder = (Node) session.getItemManager().getItem(info.getId());
                return new LockImpl(info, lockHolder);
            } else {
                throw new LockException("Node not locked: " + node);
            }
        } catch (ItemNotFoundException e) {
            throw new LockException("Node not locked: " + node);
        } finally {
            release();
        }
    }
View Full Code Here

Examples of javax.jcr.lock.LockException

        PathMap.Element element = lockMap.map(path, false);
        AbstractLockInfo info = (AbstractLockInfo) element.get();
        if (info != null) {
            if (element.hasPath(path) || info.deep) {
                if (session != info.getLockHolder()) {
                    throw new LockException("Node locked.");
                }
            }
        }
    }
View Full Code Here

Examples of javax.jcr.lock.LockException

                            session.addListener((LockInfo) info);
                        }
                    } else {
                        String msg = "Cannot add lock token: lock already held by other session.";
                        log.warn(msg);
                        throw new LockException(msg);
                    }
                }
            }
            // inform SessionLockManager
            getSessionLockManager(session).lockTokenAdded(lt);
        } catch (IllegalArgumentException e) {
            String msg = "Bad lock token: " + e.getMessage();
            log.warn(msg);
            throw new LockException(msg);
        }
    }
View Full Code Here

Examples of javax.jcr.lock.LockException

                    if (session == info.getLockHolder()) {
                        info.setLockHolder(null);
                    } else {
                        String msg = "Cannot remove lock token: lock held by other session.";
                        log.warn(msg);
                        throw new LockException(msg);
                    }
                }
            }
            // inform SessionLockManager
            getSessionLockManager(session).lockTokenRemoved(lt);
        } catch (IllegalArgumentException e) {
            String msg = "Bad lock token: " + e.getMessage();
            log.warn(msg);
            throw new LockException(msg);
        }
    }
View Full Code Here

Examples of javax.jcr.lock.LockException

        try {
            Path path = getPath(sysSession, nodeId);
            PathMap.Element element = lockMap.map(path, true);
            if (element == null) {
                throw new LockException("Node not locked: " + path.toString());
            }
            AbstractLockInfo info = (AbstractLockInfo) element.get();
            if (info == null) {
                throw new LockException("Node not locked: " + path.toString());
            }
            element.set(null);
            info.setLive(false);

            save();
View Full Code Here

Examples of javax.jcr.lock.LockException

                return;
            }
        }
        // sessionInfo doesn't contain the given lock token and is therefore
        // not the lock holder
        throw new LockException("Unable to remove locktoken '" + lt + "' from Session.");
    }
View Full Code Here

Examples of javax.jcr.lock.LockException

         // this will return null if success. And old data if something exists...
         LockData oldLockData = (LockData)node.putIfAbsent(LOCK_DATA, lockData);

         if (oldLockData != null)
         {
            throw new LockException("Unable to write LockData. Node [" + lockData.getNodeIdentifier()
               + "] already has LockData!");
         }

         session.notifyLockPersisted(nodeIdentifier);
      }
      else
      {
         throw new LockException("No lock in pending locks");
      }
   }
View Full Code Here

Examples of liquibase.exception.LockException

            + DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT).format(
                lock.getLockGranted());
      } else {
        lockedBy = "UNKNOWN";
      }
      throw new LockException("Could not acquire change log lock.  Currently locked by " + lockedBy);
    }
  }
View Full Code Here

Examples of org.apache.aurora.scheduler.state.LockManager.LockException

  @Test
  public void testCreateJobWithLockFails() throws Exception {
    IJobConfiguration job = IJobConfiguration.build(makeJob());
    expectAuth(ROLE, true);
    lockManager.validateIfLocked(LOCK_KEY, Optional.of(LOCK));
    expectLastCall().andThrow(new LockException("Invalid lock"));

    control.replay();

    assertResponse(LOCK_ERROR, thrift.createJob(job.newBuilder(), LOCK.newBuilder(), SESSION));
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.lockmgr.LockException

        }
      }

    } catch (Exception e) {
      LOG.error("Failed to create ZooKeeper object: ", e);
      throw new LockException(ErrorMsg.ZOOKEEPER_CLIENT_COULD_NOT_BE_INITIALIZED.getMsg());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.