Examples of Isolation


Examples of net.hasor.db.transaction.Isolation

            return invocation.proceed();
        }
        //3.准备事务
        DataSource dataSource = atDefine.getDataSource();
        Propagation propagation = atDefine.getPropagationStrategy().getStrategy(targetMethod);
        Isolation isolation = atDefine.getIsolationStrategy().getStrategy(targetMethod);
        TranOperations around = atDefine.getAround();
        //
        TransactionManager manager = Manager.getTransactionManager(dataSource);
        TransactionStatus tranStatus = null;
        try {
View Full Code Here

Examples of net.hasor.db.transaction.Isolation

        this.prepareCheckStack(defStatus);
        /*标记完成*/
        defStatus.setCompleted();
        /*释放资源*/
        /*恢复当时的隔离级别*/
        Isolation transactionIsolation = defStatus.getTranConn().getOriIsolationLevel();
        if (transactionIsolation != null) {
            defStatus.getTranConn().getHolder().getConnection().setTransactionIsolation(transactionIsolation.ordinal());
        }
        defStatus.getTranConn().getHolder().released();//ref--
        defStatus.getTranConn().stopTransaction();
        /*恢复挂起的事务*/
        if (defStatus.isSuspend()) {
View Full Code Here

Examples of net.hasor.db.transaction.Isolation

            defStatus.markNewConnection();/*新事物,新连接*/
        }
        holder.requested();
        //下面两行代码用于保存当前Connection的隔离级别,并且设置新的隔离级别。
        int isolationLevel = holder.getConnection().getTransactionIsolation();
        Isolation level = null;
        if (defStatus.getIsolationLevel() != Isolation.DEFAULT) {
            holder.getConnection().setTransactionIsolation(defStatus.getIsolationLevel().ordinal());
            level = Isolation.valueOf(isolationLevel);
        }
        //
View Full Code Here

Examples of org.openrdf.store.Isolation

    return true;
  }

  @Override
  public Isolation getDefaultIsolation() {
    Isolation compatible = Isolation.NONE;
    for (Isolation isolation : Isolation.values()) {
      for (RepositoryMetaData md : members) {
        if (!md.getDefaultIsolation().isCompatibleWith(isolation)) {
          return compatible;
        }
View Full Code Here

Examples of org.openrdf.store.Isolation

  @Override
  public Isolation getTransactionIsolation()
    throws StoreException
  {
    Isolation compatible = Isolation.NONE;
    for (Isolation isolation : Isolation.values()) {
      for (RepositoryConnection member : members) {
        Isolation currently = member.getTransactionIsolation();
        if (!currently.isCompatibleWith(isolation)) {
          return compatible;
        }
      }
      compatible = isolation;
    }
View Full Code Here

Examples of org.openrdf.store.Isolation

  }

  public void testSupportsIsolationLevel()
    throws Exception
  {
    Isolation isolation = testCon.getTransactionIsolation();
    RepositoryMetaData meta = testRepository.getMetaData();
    assertEquals(isolation, meta.getDefaultIsolation());
    for (Isolation i : Isolation.values()) {
      if (isolation.isCompatibleWith(i)) {
        assertTrue(meta.supportsIsolation(i));
      }
    }
  }
View Full Code Here

Examples of org.springframework.transaction.annotation.Isolation

          );

      if ( attributes.containsKey( IDBDatasourceService.DEFAULT_TRANSACTION_ISOLATION )
          && !IDBDatasourceService.TRANSACTION_ISOLATION_NONE_VALUE.equalsIgnoreCase( attributes
              .get( IDBDatasourceService.DEFAULT_TRANSACTION_ISOLATION ) ) ) {
        Isolation isolationLevel =
            Isolation.valueOf( attributes.get( IDBDatasourceService.DEFAULT_TRANSACTION_ISOLATION ) );

        if ( isolationLevel != null ) {
          pcf.setDefaultTransactionIsolation( isolationLevel.value() );
        }
      }

      if ( attributes.containsKey( IDBDatasourceService.DEFAULT_CATALOG ) ) {
        pcf.setDefaultCatalog( attributes.get( IDBDatasourceService.DEFAULT_CATALOG ) );
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.