Examples of LockException


Examples of org.apache.openjpa.util.LockException

            msg = se.getClass().getName();
        SQLException[] ses = getSQLExceptions(se);
        OpenJPAException storeEx = (dict == null) ? new StoreException(msg).setFailedObject(failed)
                .setNestedThrowables(ses) : dict.newStoreException(msg, ses, failed);
        if (level != -1 && storeEx.getSubtype() == StoreException.LOCK) {
            LockException lockEx = (LockException) storeEx;
            lockEx.setLockLevel(level);
        }
        return storeEx;
    }
View Full Code Here

Examples of org.apache.openjpa.util.LockException

    OpenJPAException narrow(String msg, SQLException ex, Object failed) {
        int errorType = matchErrorState(sqlStateCodes, ex);
        StoreException storeEx;
        switch (errorType) {
        case StoreException.LOCK:
            storeEx = new LockException(failed);
            break;
        case StoreException.OBJECT_EXISTS:
            storeEx = new ObjectExistsException(msg);
            break;
        case StoreException.OBJECT_NOT_FOUND:
View Full Code Here

Examples of org.apache.openjpa.util.LockException

    OpenJPAException narrow(String msg, SQLException ex, Object failed) {
        int errorType = matchErrorState(sqlStateCodes, ex);
        StoreException storeEx;
        switch (errorType) {
        case StoreException.LOCK:
            storeEx = new LockException(failed);
            break;
        case StoreException.OBJECT_EXISTS:
            storeEx = new ObjectExistsException(msg);
            break;
        case StoreException.OBJECT_NOT_FOUND:
View Full Code Here

Examples of org.apache.openjpa.util.LockException

     * implementation of checking lock from the result set.
     */
    protected void checkLock(ResultSet rs, OpenJPAStateManager sm)
        throws SQLException {
        if (!rs.next())
            throw new LockException(sm.getManagedInstance());
        return;
    }
View Full Code Here

Examples of org.apache.openjpa.util.LockException

          break;
        }
      }
      switch (errorType) {
        case StoreException.LOCK:
              return new LockException(msg);
        case StoreException.OBJECT_EXISTS:
              return new ObjectExistsException(msg);
        case StoreException.OBJECT_NOT_FOUND:
              return new ObjectNotFoundException(msg);
        case StoreException.OPTIMISTIC:
View Full Code Here

Examples of org.exist.util.LockException

        do {
            synchronized (monitor) {
                try {
                    monitor.wait(500);
                } catch (final InterruptedException e) {
                    throw new LockException("Interrupted while waiting for read lock");
                }
            }
            if (deadlocked) {
                LOG.warn("Deadlock detected: cancelling wait...");
                throw new DeadlockException();
View Full Code Here

Examples of org.mom4j.mstore.LockException

        String name = (String)handle.getKey();
       
        TxCtx ctx = (TxCtx)this.ctxMap.get(sessionId);
        if(ctx == null) {
            throw new LockException("no transaction");
        }

        File f   = new File(this.store.getAbsolutePath() + DELIM + name);
        File txF = new File(f.getAbsolutePath() + TX);
        if(!f.exists()) {
            if(!ctx.locked.contains(txF))
                throw new LockException(name + " does not exist or locked by another tx");
        } else {
            if(f.renameTo(txF)) {
                ctx.lock(txF);
            } else {
                throw new LockException(name + " could not be locked");
            }
        }
    }
View Full Code Here

Examples of org.neo4j.kernel.impl.transaction.LockException

            {
                nodeManager.setRollbackOnly();
            }
            if ( releaseFailed )
            {
                throw new LockException( "Unable to release locks ["
                    + startNode + "," + endNode + "] in relationship delete->"
                    + this );
            }
        }
    }
View Full Code Here

Examples of org.ontoware.rdf2go.exception.LockException

  }

  @Override
  public void lock() throws LockException {
    if (isLocked()) {
      throw new LockException("Already locked");
    }
    else {
      super.lock();
      this.lock.enterCriticalSection(com.hp.hpl.jena.shared.Lock.WRITE);
    }
View Full Code Here

Examples of org.quartz.impl.jdbcjobstore.LockException

                getLog().debug(
                    "Lock '" + lockName + "' was not obtained by: " +
                    Thread.currentThread().getName());
            }
           
            throw new LockException("Failure obtaining db row lock: "
                    + sqle.getMessage(), sqle);
        } finally {
            if (rs != null) {
                try {
                    rs.close();
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.