Examples of DeadlockException


Examples of net.sf.ehcache.transaction.DeadLockException

                                    " lock to die...", new Object[] {cacheName, key, timeBeforeTimeout()});
                            boolean locked = softLock.tryLock(timeBeforeTimeout());
                            if (!locked) {
                                LOG.debug("removeElement: cache [{}] key [{}] soft locked in foreign transaction and not released" +
                                        " before current transaction timeout", cacheName, key);
                                throw new DeadLockException("deadlock detected in cache [" + cacheName + "] on key [" + key + "] between" +
                                        " current transaction [" + getCurrentTransactionContext().getTransactionId() + "] and foreign" +
                                        " transaction [" + softLock.getTransactionID() + "]");
                            }
                            softLock.clearTryLock();
                        } catch (InterruptedException ie) {
View Full Code Here

Examples of net.sf.ehcache.transaction.DeadLockException

                                    " soft lock to die...", new Object[] {cacheName, key, timeBeforeTimeout()});
                            boolean locked = softLock.tryLock(timeBeforeTimeout());
                            if (!locked) {
                                LOG.debug("replace: cache [{}] key [{}] soft locked in foreign transaction and not released before" +
                                        " current transaction timeout", cacheName, key);
                                throw new DeadLockException("deadlock detected in cache [" + cacheName + "] on key [" + key + "]" +
                                        " between current transaction [" + getCurrentTransactionContext().getTransactionId() + "]" +
                                        " and foreign transaction [" + softLock.getTransactionID() + "]");
                            }
                            softLock.clearTryLock();
                        } catch (InterruptedException ie) {
View Full Code Here

Examples of net.sf.ehcache.transaction.DeadLockException

                                    " to die...", new Object[] {cacheName, key, timeBeforeTimeout()});
                            boolean locked = softLock.tryLock(timeBeforeTimeout());
                            if (!locked) {
                                LOG.debug("replace: cache [{}] key [{}] soft locked in foreign transaction and not released before" +
                                        " current transaction timeout", cacheName, key);
                                throw new DeadLockException("deadlock detected in cache [" + cacheName + "] on key [" + key + "]" +
                                        " between current transaction [" + getCurrentTransactionContext().getTransactionId() + "]" +
                                        " and foreign transaction [" + softLock.getTransactionID() + "]");
                            }
                            softLock.clearTryLock();
                        } catch (InterruptedException ie) {
View Full Code Here

Examples of nexj.core.persistence.DeadlockException

         throw new ValueRangeException("err.persistence.valueRange", e);
      }

      if(isDeadlockException(e))
      {
         return new DeadlockException(e);
      }

      if (isLockTimeoutException(e))
      {
         return new LockTimeoutException(e);
View Full Code Here

Examples of org.apache.torque.DeadlockException

            return new ConstraintViolationException(sqlException);
        }
        if (StringUtils.equals(sqlException.getSQLState(), "40001"))
        {
            // mysql, derby, mssql
            return new DeadlockException(sqlException);
        }
        if (StringUtils.equals(sqlException.getSQLState(), "40P01"))
        {
            // postgresql
            return new DeadlockException(sqlException);
        }
        if (StringUtils.equals(sqlException.getSQLState(), "61000")
                && sqlException.getErrorCode() == 60)
        {
            // oracle
            return new DeadlockException(sqlException);
        }
        return new TorqueException(sqlException);
    }
View Full Code Here

Examples of org.axonframework.common.lock.DeadlockException

    @Test(timeout = 2000)
    public void testRetrySchedulerInvokedOnExceptionCausedByDeadlock() throws Throwable {
        final AtomicReference<Object> result = new AtomicReference<Object>();
        final AtomicReference<Throwable> error = new AtomicReference<Throwable>();
        doAnswer(new Failure(new RuntimeException(new DeadlockException("Mock"))))
                .when(mockCommandBus).dispatch(isA(CommandMessage.class), isA(CommandCallback.class));
        try {
            result.set(gateway.waitForReturnValue("Command"));
        } catch (Exception e) {
            error.set(e);
View Full Code Here

Examples of org.axonframework.common.lock.DeadlockException

    @Test(timeout = 2000)
    public void testRetrySchedulerNotInvokedOnExceptionCausedByDeadlockAndActiveUnitOfWork() throws Throwable {
        final AtomicReference<Object> result = new AtomicReference<Object>();
        final AtomicReference<Throwable> error = new AtomicReference<Throwable>();
        doAnswer(new Failure(new RuntimeException(new DeadlockException("Mock"))))
                .when(mockCommandBus).dispatch(isA(CommandMessage.class), isA(CommandCallback.class));
        UnitOfWork uow = DefaultUnitOfWork.startAndGet();
        try {
            result.set(gateway.waitForReturnValue("Command"));
        } catch (Exception e) {
View Full Code Here

Examples of org.exist.util.DeadlockException

                    throw new LockException("Interrupted while waiting for read lock");
                }
            }
            if (deadlocked) {
                LOG.warn("Deadlock detected: cancelling wait...");
                throw new DeadlockException();
            }
        } while (suspended);
    }
View Full Code Here

Examples of org.exist.util.DeadlockException

            {throw exceptionCaught;}
        if (deadlockedThreads != null) {
            for (final WaitingThread wt : deadlockedThreads) {
                wt.signalDeadlock();
            }
            throw new DeadlockException();
        }
        return true;
    }
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.