Package com.volantis.mcs.repository.lock

Examples of com.volantis.mcs.repository.lock.LockException


            throw new IllegalArgumentException("principal cannot be null");
        }

        if (principal.equals(owner)) {
            if (!manager.releaseLock(resourceIdentifier, principal)) {
                throw new LockException("Lock for " + resourceIdentifier +
                        " is not owned by " + principal.getName());
            }
        } else if (owner == null) {
            throw new IllegalStateException(
                    "Lock cannot be released as it is not owned");
View Full Code Here


                    PRINCIPAL_COLUMN_NAME + " = ?";
            deleteLockStatement = sqlConnection.prepareStatement(sql);
            deleteLockStatement.setString(1, projectName);

        } catch (SQLException e) {
            throw new LockException(e);
        } catch (RepositoryException e) {
            throw new LockException(e);
        }
    }
View Full Code Here

                Lock lock = updateLock(resourceIdentifier, principal,
                        acquisitionTime.getTime());
                locks.add(lock);
            }
        } catch (SQLException e) {
            throw new LockException(e);
        }

        // todo, what about the locks that are in the map but not in the database anymore.

        return locks;
View Full Code Here

                lockInfo = queryLockInfo(resourceIdentifier);

            } while (lockInfo == null);

        } catch (SQLException e) {
            throw new LockException(e);
        }

        return lockInfo;
    }
View Full Code Here

                return false;
            } else {
                return true;
            }
        } catch (SQLException e) {
            throw new LockException(e);
        }
    }
View Full Code Here

                Principal principal = new JDBCPrincipal(principalName);
                Timestamp acquisitionTime = resultSet.getTimestamp(2);
                info = new JDBCLockInfo(principal, acquisitionTime.getTime());
            }
        } catch (SQLException e) {
            throw new LockException(e);
        }

        return info;
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.repository.lock.LockException

Copyright © 2018 www.massapicom. 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.