Package org.apache.slide.macro

Examples of org.apache.slide.macro.ConflictException


                XMLValue checkoutSetValue = new XMLValue( checkoutSetProp.getValue().toString() );
                if (checkoutSetValue.iterator().hasNext()) {
                    b.append(" - please use "+checkoutSetValue.getTextValue()+" instead");
                }
            }
            throw new ConflictException(
                rUri, new SlideException(b.toString()));
        }
        content.store(sToken, coutNrds.getUri(), coutNrd, null);
       
        // update VCR to previous VR
View Full Code Here


                    XMLValue checkoutSetValue = new XMLValue( checkoutSetProp.getValue().toString() );
                    if (checkoutSetValue.iterator().hasNext()) {
                        b.append(" - please use "+checkoutSetValue.getTextValue()+" instead");
                    }
                }
                throw new ConflictException(
                    rUri, new SlideException(b.toString()));
            }
            content.store(sToken, vhrNrds.getUri(), vrNrdOld, null);
           
            // check preconditions
View Full Code Here

                    + txId
                    + " for rollback",
                LOG_CHANNEL,
                Logger.INFO);

            throw new ServiceAccessException(this, new ConflictException(uri));

        } else {

            getLogger().log(
                "Thread " + Thread.currentThread() + " marking transaction branch " + txId + " for rollback",
View Full Code Here

    String sqlstate = e.getSQLState();

    if (sqlstate.startsWith("23")) {
      getLogger().log(e.getErrorCode() + ": Deadlock resolved on " + uri,
        LOG_CHANNEL, Logger.WARNING);
      return new ServiceAccessException(service, new ConflictException(uri));
    } else if (sqlstate.startsWith("40")) {
      getLogger().log(
        e.getErrorCode() + ": Deadlock resolved on " + uri,
        LOG_CHANNEL,
        Logger.WARNING);
      return new ServiceAccessException(service, new ConflictException(uri));
    } else {
      getLogger().log(
        "SQL error "
          + e.getErrorCode()
          + " on "
View Full Code Here

    protected ServiceAccessException createException(SQLException e, String uri) {

        switch (e.getErrorCode()) {
            case 1213 : // thread was deadlock victim
                getLogger().log(e.getErrorCode() + ": Deadlock resolved on " + uri, LOG_CHANNEL, Logger.WARNING);
                return new ServiceAccessException(service, new ConflictException(uri));

            default :
                getLogger().log(
                    "SQL error " + e.getErrorCode() + " on " + uri + ": " + e.getMessage(),
                    LOG_CHANNEL,
View Full Code Here

    protected ServiceAccessException createException(SQLException e, String uri) {

        switch (e.getErrorCode()) {
            case 1205 : // thread was deadlock victim
                getLogger().log(e.getErrorCode() + ": Deadlock resolved on " + uri, LOG_CHANNEL, Logger.WARNING);
                return new ServiceAccessException(service, new ConflictException(uri));
               
            case 547 : // referential integraty constaint was violated (like in storeObject on table URI )
            case 2627 : // primary key constraint violation (like in storeContent on table VERSION_CONTENT)
                getLogger().log(e.getErrorCode() + ": Low isolation conflict for " + uri, LOG_CHANNEL, Logger.WARNING);
                return new ServiceAccessException(service, new ConflictException(uri));
               
            default :
            getLogger().log("SQL error " + e.getErrorCode() + " on " + uri + ": " + e.getMessage(),
                LOG_CHANNEL,
                Logger.ERROR);
View Full Code Here

                XMLValue checkoutSetValue = new XMLValue( checkoutSetProp.getValue().toString() );
                if (checkoutSetValue.iterator().hasNext()) {
                    b.append(" - please use "+checkoutSetValue.getTextValue()+" instead");
                }
            }
            throw new ConflictException(
                rUri, new SlideException(b.toString()));
        }
        content.store(sToken, coutNrds.getUri(), coutNrd, null);
       
        // update VCR to previous VR
View Full Code Here

                    XMLValue checkoutSetValue = new XMLValue( checkoutSetProp.getValue().toString() );
                    if (checkoutSetValue.iterator().hasNext()) {
                        b.append(" - please use "+checkoutSetValue.getTextValue()+" instead");
                    }
                }
                throw new ConflictException(
                    rUri, new SlideException(b.toString()));
            }
            content.store(sToken, vhrNrds.getUri(), vrNrdOld, null);
           
            // check preconditions
View Full Code Here

   
        if (sqlstate != null) {
            if (sqlstate.startsWith("23")) {
                getLogger().log(e.getErrorCode() + ": Deadlock resolved on " + uri,
                    LOG_CHANNEL, Logger.WARNING);
                return new ServiceAccessException(service, new ConflictException(uri));
            } else if (sqlstate.startsWith("40")) {
                getLogger().log(
                    e.getErrorCode() + ": Deadlock resolved on " + uri,
                    LOG_CHANNEL,
                    Logger.WARNING);
                return new ServiceAccessException(service, new ConflictException(uri));
            } else {
                getLogger().log(
                    "SQL error "
                        + e.getErrorCode()
                        + " on "
View Full Code Here

    protected ServiceAccessException createException(SQLException e, String uri) {

        switch (e.getErrorCode()) {
            case 1205 : // thread was deadlock victim
                getLogger().log(e.getErrorCode() + ": Deadlock resolved on " + uri, LOG_CHANNEL, Logger.WARNING);
                return new ServiceAccessException(service, new ConflictException(uri));

            case 547 : // referential integraty constaint was violated (like in storeObject on table URI )
            case 2627 : // primary key constraint violation (like in storeContent on table VERSION_CONTENT)
                getLogger().log(e.getErrorCode() + ": Low isolation conflict for " + uri, LOG_CHANNEL, Logger.WARNING);
                return new ServiceAccessException(service, new ConflictException(uri));

            default :
                getLogger().log(
                    "SQL error " + e.getErrorCode() + " on " + uri + ": " + e.getMessage(),
                    LOG_CHANNEL,
View Full Code Here

TOP

Related Classes of org.apache.slide.macro.ConflictException

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.