Package org.g4studio.core.orm.xibatis.sqlmap.engine.transaction

Examples of org.g4studio.core.orm.xibatis.sqlmap.engine.transaction.TransactionConfig


        state.getConfig().getErrorContext().setActivity("configuring the transaction manager");
        type = state.getConfig().getTypeHandlerFactory().resolveAlias(type);
        TransactionManager txManager;
        try {
          state.getConfig().getErrorContext().setMoreInfo("Check the transaction manager type or class.");
          TransactionConfig config = (TransactionConfig) Resources.instantiate(type);
          config.setDataSource(state.getDataSource());
          state.getConfig().getErrorContext()
              .setMoreInfo("Check the transactio nmanager properties or configuration.");
          config.setProperties(state.getTxProps());
          config.setForceCommit(commitRequired);
          config.setDataSource(state.getDataSource());
          state.getConfig().getErrorContext().setMoreInfo(null);
          txManager = new TransactionManager(config);
        } catch (Exception e) {
          if (e instanceof SqlMapException) {
            throw (SqlMapException) e;
View Full Code Here


      this.sqlMapClient = buildSqlMapClient(this.configLocations, this.mappingLocations,
          this.sqlMapClientProperties);

      // Tell the SqlMapClient to use the given DataSource, if any.
      if (this.dataSource != null) {
        TransactionConfig transactionConfig = (TransactionConfig) this.transactionConfigClass.newInstance();
        DataSource dataSourceToUse = this.dataSource;
        if (this.useTransactionAwareDataSource && !(this.dataSource instanceof TransactionAwareDataSourceProxy)) {
          dataSourceToUse = new TransactionAwareDataSourceProxy(this.dataSource);
        }
        transactionConfig.setDataSource(dataSourceToUse);
        transactionConfig.initialize(this.transactionConfigProperties);
        applyTransactionConfig(this.sqlMapClient, transactionConfig);
      }
    }

    finally {
View Full Code Here

TOP

Related Classes of org.g4studio.core.orm.xibatis.sqlmap.engine.transaction.TransactionConfig

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.