Package org.teiid.test.framework.exception

Examples of org.teiid.test.framework.exception.TransactionRuntimeException


    public void validate() {
  // TODO Auto-generated method stub

  jndi_name = getEnvironment().getProperty(DS_JNDINAME);
  if (jndi_name == null || jndi_name.length() == 0) {
      throw new TransactionRuntimeException("Property " + DS_JNDINAME
        + " was not specified");
  }
    }
View Full Code Here


    try {
        Object parm = createParmType(parmElement);
        parms[i] = parm;
        i++;
    } catch (JDOMException e) {
        throw new TransactionRuntimeException(e);
    }   
  }
 
 
 
View Full Code Here

            lprops.load(in);
            props.putAll(lprops);
           
          }
          else {
            throw new TransactionRuntimeException("Failed to load properties from file '"+filename+ "' configuration file");
          }
      } catch (IOException e) {
          throw new TransactionRuntimeException("Error loading properties from file '"+filename+ "'" + e.getMessage());
      } finally {
    try {
        in.close();
    } catch(Exception e){
       
View Full Code Here

    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

  QueryScenario scenario;
  try {
      scenario = (QueryScenario) ReflectionHelper.create(clzzname, args, null);
  } catch (Exception e) {
      e.printStackTrace();
      throw new TransactionRuntimeException(e);
  }
  return scenario;
    }
View Full Code Here

  QueryReader reader;
  try {
      reader = (QueryReader) ReflectionHelper.create(clzzname, args, null);
  } catch (Exception e) {
      e.printStackTrace();
      throw new TransactionRuntimeException(e);
 

  return reader;
    }
View Full Code Here

 
  ResultsGenerator resultsgen;
  try {
      resultsgen = (ResultsGenerator) ReflectionHelper.create(clzzname, args, null);
  } catch (Exception e) {
      throw new TransactionRuntimeException(e.getMessage());
 

  return resultsgen;
    }
View Full Code Here

 
  ExpectedResults expResults;
  try {
      expResults = (ExpectedResults) ReflectionHelper.create(clzzname, args, null);
  } catch (Exception e) {
      throw new TransactionRuntimeException(e.getMessage());
 

  return expResults;
    }
View Full Code Here

  try {
      this.errorExpected = expectedResults
        .isExceptionExpected(query.getQueryID());
  } catch (QueryTestFailedException e) {
      // TODO Auto-generated catch block
      throw new TransactionRuntimeException("ProgramError: "
        + e.getMessage());
  }

    }
View Full Code Here

//  Map<String, Object> queries = new HashMap<String, Object>();
  File queryFile = new File(queryFileName);
  if (!queryFile.exists() || !queryFile.canRead()) {
      String msg = "Query file doesn't exist or cannot be read: " + queryFileName + ", ignoring and continuing";
      TestLogger.log(msg);
      throw new TransactionRuntimeException(msg); //$NON-NLS-1$ //$NON-NLS-2$
  }
      // Get query set name
      //      String querySet = getQuerySetName(queryFileName) ; //$NON-NLS-1$

      XMLQueryVisitationStrategy jstrat = new XMLQueryVisitationStrategy();
View Full Code Here

TOP

Related Classes of org.teiid.test.framework.exception.TransactionRuntimeException

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.