Package org.teiid.test.framework

Examples of org.teiid.test.framework.TransactionContainer


       
    private TransactionFactory(){}
       
   
    public static TransactionContainer create(ConfigPropertyLoader config) throws QueryTestFailedException {
      TransactionContainer transacton = null;
           
        String type = config.getProperty(TRANSACTION_TYPE);
        if (type == null) {
            throw new TransactionRuntimeException(TRANSACTION_TYPE + " property was not specified" );
        }
       
      
        TestLogger.logDebug("====  Create Transaction-Option: " + type);
       
        if (type.equalsIgnoreCase(TRANSACTION_TYPES.LOCAL_TRANSACTION)) {
          transacton = new LocalTransaction();
        }
        else if (type.equalsIgnoreCase(TRANSACTION_TYPES.XATRANSACTION)) {
          transacton = new XATransaction();
        }
        else if (type.equalsIgnoreCase(TRANSACTION_TYPES.JNDI_TRANSACTION)) {
          transacton = new JNDITransaction();
        }
       else if (type.equalsIgnoreCase(TRANSACTION_TYPES.OFFWRAP_TRANSACTION)) {
              transacton = new TxnAutoTransaction(TXN_AUTO_WRAP_OPTIONS.AUTO_WRAP_OFF);
        }
        else if (type.equalsIgnoreCase(TRANSACTION_TYPES.ONWRAP_TRANSACTION)) {
          transacton = new TxnAutoTransaction(TXN_AUTO_WRAP_OPTIONS.AUTO_WRAP_ON);
        }
            else if (type.equalsIgnoreCase(TRANSACTION_TYPES.AUTOWRAP_TRANSACTION)) {
          transacton = new TxnAutoTransaction(TXN_AUTO_WRAP_OPTIONS.AUTO_WRAP_AUTO);

        } else {
          throw new TransactionRuntimeException("Invalid property value of " + type + " for " + TRANSACTION_TYPE );
        }

        TestLogger.log("====  TransactionContainer: " + transacton.getClass().getName() + " option:" + type);
        return transacton;
    }
View Full Code Here


  ConfigPropertyLoader.getInstance().setProperty(DriverConnection.DS_URL, url);
 
 
  QueryScenario set = ClassFactory.createQueryScenario(scenario_name);
 
  TransactionContainer tc = getTransactionContainter();

  runTestCase(set,  tc);

  TestLogger.log("Completed scenario " + scenario_name);
    }
View Full Code Here

TOP

Related Classes of org.teiid.test.framework.TransactionContainer

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.