Package com.baasbox.exception

Examples of com.baasbox.exception.TransactionIsStillOpenException


            return F.Promise.<SimpleResult>pure(status(503,message));
          }
     
      result = delegate.call(ctx);

      if (DbHelper.getConnection()!=null && DbHelper.isInTransaction()) throw new TransactionIsStillOpenException("Controller leaved an open transaction. Database will be rollbacked");
     
    }catch (OSecurityAccessException e){
      if (Logger.isDebugEnabled()) Logger.debug("ConnectToDB: user authenticated but a security exception against the resource has been detected: " + e.getMessage());
      result = F.Promise.<SimpleResult>pure(forbidden(e.getMessage()));
    }catch (InvalidAppCodeException e){
View Full Code Here


  public static void close(ODatabaseRecordTx db) {
    if (Logger.isDebugEnabled()) Logger.debug("closing connection");
    if (db!=null && !db.isClosed()){
      //HooksManager.unregisteredAll(db);
      try{
        if (tranCount.get()!=0) throw new TransactionIsStillOpenException("Closing a connection with an active transaction: " + tranCount.get());
      }finally{
        db.close();
        tranCount.set(0);
      }
    }else if (Logger.isDebugEnabled()) Logger.debug("connection already close or null");
View Full Code Here

TOP

Related Classes of com.baasbox.exception.TransactionIsStillOpenException

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.