org.teiid.test.framework.connection
Class ConnectionStrategy

java.lang.Object
  extended by org.teiid.test.framework.connection.ConnectionStrategy
Direct Known Subclasses:
DataSourceConnection, DriverConnection, JEEConnection

public abstract class ConnectionStrategy
extends Object


Constructor Summary
ConnectionStrategy(Properties props)
           
 
Method Summary
 XAConnection createDataSourceConnection(String identifier)
           
 Connection createDriverConnection(String identifier)
           
 Connection getAdminConnection()
           
 boolean getAutocommit()
           
abstract  Connection getConnection()
          Returns a connection
 Properties getEnvironment()
           
 XAConnection getXAConnection()
           
 boolean isDataStoreDisabled()
          In certain testcases, the data that being provided is already preconfigured and should not be touched by the DataStore processing.
 void setEnvironmentProperty(String key, String value)
           
 void shutdown()
           
 boolean useProxy()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionStrategy

public ConnectionStrategy(Properties props)
Method Detail

getConnection

public abstract Connection getConnection()
                                  throws QueryTestFailedException
Returns a connection

Returns:
Connection
Throws:
QueryTestFailedException

useProxy

public boolean useProxy()

shutdown

public void shutdown()
Since:

getAdminConnection

public Connection getAdminConnection()
                              throws QueryTestFailedException
Throws:
QueryTestFailedException

getAutocommit

public boolean getAutocommit()

getXAConnection

public XAConnection getXAConnection()
                             throws QueryTestFailedException
Throws:
QueryTestFailedException

isDataStoreDisabled

public boolean isDataStoreDisabled()
In certain testcases, the data that being provided is already preconfigured and should not be touched by the DataStore processing.

Returns:

getEnvironment

public Properties getEnvironment()

setEnvironmentProperty

public void setEnvironmentProperty(String key,
                                   String value)

createDriverConnection

public Connection createDriverConnection(String identifier)
                                  throws QueryTestFailedException
Throws:
QueryTestFailedException

createDataSourceConnection

public XAConnection createDataSourceConnection(String identifier)
                                        throws QueryTestFailedException
Throws:
QueryTestFailedException


Copyright © 2011. All Rights Reserved.