Package org.apache.commons.transaction.locking

Examples of org.apache.commons.transaction.locking.GenericLock.acquire()


                      + uri
                      + (owner != null ? " ---> "
                          + owner.toString()
                          + " has it" : ""),
                  LOG_CHANNEL, Logger.DEBUG);
          if (!lock.acquire(txId, 1, true, true, timeout)) {
            throw new ServiceAccessException(this,
                new ConflictException(uri));
          }
          ((HashSet) locks.get()).add(lock);
          getLogger().log("Has lock: " + txId + " locks " + uri,
View Full Code Here


                GenericLock lock = (GenericLock) it.next();
                // only upgrade if we had write access
                if (lock.getLockLevel(txId) == LOCK_EXCLUSIVE) {
                    try {
                        // in case of deadlocks, make failure of non-committing tx more likely
                        if (!lock
                            .acquire(
                                txId,
                                LOCK_COMMIT,
                                true,
                                true,
View Full Code Here

                GenericLock lock = (GenericLock) it.next();
                // only upgrade if we had write access
                if (lock.getLockLevel(txId) == LOCK_EXCLUSIVE) {
                    try {
                        // in case of deadlocks, make failure of non-committing tx more likely
                        if (!lock
                            .acquire(
                                txId,
                                LOCK_COMMIT,
                                true,
                                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.