Package org.jtester.module.database.environment

Examples of org.jtester.module.database.environment.DBEnvironment


   * 使用指定的数据源执行相关sql操作
   *
   * @param dataSourceName
   */
  public void useSpecDataSource(String dataSourceName) {
    DBEnvironment environment = DBEnvironmentFactory.getDBEnvironment(dataSourceName);
    DBEnvironmentFactory.changeDBEnvironment(environment);
  }
View Full Code Here


   *            数据源名称
   * @param dataSourceFrom
   *            数据源配置文件
   */
  public void useSpecDataSource(String dataSourceName, String dataSourceFrom) {
    DBEnvironment environment = DBEnvironmentFactory.getDBEnvironment(dataSourceName, dataSourceFrom);
    DBEnvironmentFactory.changeDBEnvironment(environment);
  }
View Full Code Here

   * <br>
   * Starts a new transaction on the transaction manager configured in jTester
   */
  public void startTransaction() {
    try {
      DBEnvironment environment = DBEnvironmentFactory.getCurrentDBEnvironment();
      DataSource dataSource = environment.getDataSource(true);
      PlatformTransactionManager platformTransactionManager = new DataSourceTransactionManager(dataSource);

      setTransaction(platformTransactionManager);
    } catch (UnConfigDataBaseTypeException e) {
      setTransaction(null);
View Full Code Here

TOP

Related Classes of org.jtester.module.database.environment.DBEnvironment

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.