org.teiid.test.framework.datasource
Class DataSourceMgr

java.lang.Object
  extended by org.teiid.test.framework.datasource.DataSourceMgr

public class DataSourceMgr
extends java.lang.Object

The DataSourceMgr is responsible for loading and managing the datasources defined by the datasource connection properties file. There's only a need to load the set of available datasources once for the duration of the entire test suite. And it will maintain one DataSource for each connection.properties file that it finds.

Author:
vanhalbert

Field Summary
static java.lang.String DEFAULT_DATASOURCES_LOC
          Defines the default location where the datasource files will be found.
 
Method Summary
 DataSource getDataSource(java.lang.String modelname)
           
 java.util.Map<java.lang.String,DataSource> getDataSources()
           
static DataSourceMgr getInstance()
           
 int numberOfAvailDataSources()
           
 void setDataSource(java.lang.String modelName, DataSource ds)
           
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DATASOURCES_LOC

public static final java.lang.String DEFAULT_DATASOURCES_LOC
Defines the default location where the datasource files will be found. An override can be specified by setting the property ConfigPropertyNames.OVERRIDE_DATASOURCES_LOC.

See Also:
Constant Field Values
Method Detail

getInstance

public static DataSourceMgr getInstance()

getDataSources

public java.util.Map<java.lang.String,DataSource> getDataSources()

numberOfAvailDataSources

public int numberOfAvailDataSources()

getDataSource

public DataSource getDataSource(java.lang.String modelname)

shutdown

public void shutdown()

setDataSource

public void setDataSource(java.lang.String modelName,
                          DataSource ds)


Copyright © 2011. All Rights Reserved.