Package org.apache.openjpa.util

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


    public static OpenJPAException getStoreSQLException(
        OpenJPAConfiguration config, SQLException se, DBDictionary dict,
        int level) {
        OpenJPAException storeEx = SQLExceptions.getStore(se, dict);
        if (storeEx.getSubtype() == StoreException.LOCK) {
            LockException lockEx = (LockException) storeEx;
            lockEx.setLockLevel(level);
        }
        return storeEx;
    }
View Full Code Here

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

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

          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

TOP

Related Classes of org.apache.openjpa.util.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.