Package org.springframework.jdbc.datasource

Examples of org.springframework.jdbc.datasource.DataSourceTransactionManager.commit()


    // TODO: This is where the DAO interface's update scripts would
    // be run.
   
    // Commit the transaction.
    try {
      transactionManager.commit(transactionStatus);
    }
    catch(TransactionException e) {
      transactionManager.rollback(transactionStatus);
      throw
        new IllegalStateException(
View Full Code Here


          next.evaluate();
        } catch (Throwable e) {
          tm.rollback(txStatus);
          throw e;
        }
        tm.commit(txStatus);
      } finally {
        database.shutdown();       
      }
    }
View Full Code Here

        log.debug("Committing JDBC transaction");
       
        DataSourceTransactionManager txManager = this.transactionManagers.get(dataSource);
       
        TransactionStatus transactionStatus = ((MultiDataSourcesTransactionStatus)status).get(dataSource);
        txManager.commit(transactionStatus);

        log.debug("Commit JDBC transaction success");
      } catch (Throwable e) {
        log.debug("Could not commit JDBC transaction", e);
        ex = e;
View Full Code Here

  public final static void testIfHasTransactional() {
    PlatformTransactionManager platformTransactionManager = new DataSourceTransactionManager(DBEnvironmentFactory
        .getCurrentDBEnvironment().getDataSource(false));
    TransactionStatus status = platformTransactionManager.getTransaction(new DefaultTransactionDefinition(
        TransactionDefinition.PROPAGATION_NEVER));
    platformTransactionManager.commit(status);
  }

  /**
   * 强行终止spring事务,如果已经存在
   */
 
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.