com.metamatrix.jdbc
Class EmbeddedDataSource

java.lang.Object
  extended by com.metamatrix.jdbc.WrapperImpl
      extended by com.metamatrix.jdbc.BaseDataSource
          extended by com.metamatrix.jdbc.EmbeddedDataSource
All Implemented Interfaces:
java.io.Serializable, java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.ConnectionPoolDataSource, javax.sql.DataSource, javax.sql.XADataSource

public class EmbeddedDataSource
extends BaseDataSource

Since:
4.3
See Also:
Serialized Form

Field Summary
static java.lang.String DQP_BOOTSTRAP_FILE
           
static java.lang.String USE_LATEST_VDB_VERSION
           
 
Fields inherited from class com.metamatrix.jdbc.BaseDataSource
APP_NAME, DEFAULT_FETCH_SIZE, DEFAULT_LOG_LEVEL, DEFAULT_PARTIAL_RESULTS_MODE, DEFAULT_RESULT_SET_CACHE_MODE, DEFAULT_TIMEOUT, JDBC, METAMATRIX_PROTOCOL, PASSWORD, TXN_AUTO_WRAP_OFF, TXN_AUTO_WRAP_ON, TXN_AUTO_WRAP_OPTIMISTIC, TXN_AUTO_WRAP_PESSIMISTIC, USER_NAME, VDB_NAME, VDB_VERSION, VERSION
 
Constructor Summary
EmbeddedDataSource()
          Constructor for EmbeddedDataSource.
 
Method Summary
protected  java.util.Properties buildProperties(java.lang.String userName, java.lang.String password)
           
 java.lang.String getBootstrapFile()
          Returns the path and file name from which embedded DQP configuration information will be read.
 java.sql.Connection getConnection(java.lang.String userName, java.lang.String password)
           
 int getInitialPoolSize()
           
 int getMaxIdleTime()
           
 int getMaxPoolSize()
           
 int getMaxStatements()
           
 int getMinPoolSize()
           
 int getPropertyCycle()
           
static java.lang.String reasonWhyInvalidConfigFile(java.lang.String configFile)
          Return the reason why the supplied config file may be invalid, or null if it is considered valid.
 void setBootstrapFile(java.lang.String configFile)
          Sets file name from which embedded DQP configuration information * will be read.
 void setInitialPoolSize(int initialPoolSize)
           
 void setMaxIdleTime(int maxIdleTime)
           
 void setMaxPoolSize(int maxPoolSize)
           
 void setMaxStatements(int maxStatements)
           
 void setMinPoolSize(int minPoolSize)
           
 void setPropertyCycle(int propertyCycle)
           
protected  void validateProperties(java.lang.String userName, java.lang.String password)
           
 
Methods inherited from class com.metamatrix.jdbc.BaseDataSource
getAdditionalProperties, getApplicationName, getClientToken, getConnection, getDatabaseName, getDatabaseVersion, getDataSourceName, getDescription, getDisableLocalTxn, getFetchSize, getLoginTimeout, getLogWriter, getPartialResultsMode, getPassword, getPooledConnection, getPooledConnection, getResultSetCacheMode, getSqlOptions, getTransactionAutoWrap, getUser, getXAConnection, getXAConnection, reasonWhyInvalidApplicationName, reasonWhyInvalidClientToken, reasonWhyInvalidDatabaseName, reasonWhyInvalidDatabaseVersion, reasonWhyInvalidDataSourceName, reasonWhyInvalidDescription, reasonWhyInvalidFetchSize, reasonWhyInvalidPartialResultsMode, reasonWhyInvalidPassword, reasonWhyInvalidTransactionAutoWrap, reasonWhyInvalidUser, setAdditionalProperties, setApplicationName, setClientToken, setDatabaseName, setDatabaseVersion, setDataSourceName, setDescription, setDisableLocalTxn, setFetchSize, setLoginTimeout, setLogWriter, setPartialResultsMode, setPassword, setResultSetCacheMode, setSqlOptions, setTransactionAutoWrap, setUser
 
Methods inherited from class com.metamatrix.jdbc.WrapperImpl
isWrapperFor, unwrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

Field Detail

USE_LATEST_VDB_VERSION

public static final java.lang.String USE_LATEST_VDB_VERSION
See Also:
Constant Field Values

DQP_BOOTSTRAP_FILE

public static final java.lang.String DQP_BOOTSTRAP_FILE
See Also:
Constant Field Values
Constructor Detail

EmbeddedDataSource

public EmbeddedDataSource()
Constructor for EmbeddedDataSource.

Method Detail

buildProperties

protected java.util.Properties buildProperties(java.lang.String userName,
                                               java.lang.String password)
Overrides:
buildProperties in class BaseDataSource

validateProperties

protected void validateProperties(java.lang.String userName,
                                  java.lang.String password)
                           throws java.sql.SQLException
Overrides:
validateProperties in class BaseDataSource
Throws:
java.sql.SQLException

reasonWhyInvalidConfigFile

public static java.lang.String reasonWhyInvalidConfigFile(java.lang.String configFile)
Return the reason why the supplied config file may be invalid, or null if it is considered valid.

Parameters:
configFile - a possible value for the property
Returns:
the reason why the property is invalid, or null if it is considered valid
See Also:
setBootstrapFile(String)

getConnection

public java.sql.Connection getConnection(java.lang.String userName,
                                         java.lang.String password)
                                  throws java.sql.SQLException
Throws:
java.sql.SQLException
Since:
4.3
See Also:
DataSource.getConnection(java.lang.String, java.lang.String)

getBootstrapFile

public java.lang.String getBootstrapFile()
Returns the path and file name from which embedded DQP configuration information will be read.

Returns:
the name of the config file for this data source; may be null

setBootstrapFile

public void setBootstrapFile(java.lang.String configFile)
Sets file name from which embedded DQP configuration information * will be read.

Parameters:
configFile - The name of the config file name to set

getInitialPoolSize

public int getInitialPoolSize()
Returns:
Returns the initialPoolSize.
Since:
4.3

setInitialPoolSize

public void setInitialPoolSize(int initialPoolSize)
Parameters:
initialPoolSize - The initialPoolSize to set.
Since:
4.3

getMaxIdleTime

public int getMaxIdleTime()
Returns:
Returns the maxIdleTime.
Since:
4.3

setMaxIdleTime

public void setMaxIdleTime(int maxIdleTime)
Parameters:
maxIdleTime - The maxIdleTime to set.
Since:
4.3

getMaxPoolSize

public int getMaxPoolSize()
Returns:
Returns the maxPoolSize.
Since:
4.3

setMaxPoolSize

public void setMaxPoolSize(int maxPoolSize)
Parameters:
maxPoolSize - The maxPoolSize to set.
Since:
4.3

getMaxStatements

public int getMaxStatements()
Returns:
Returns the maxStatements.
Since:
4.3

setMaxStatements

public void setMaxStatements(int maxStatements)
Parameters:
maxStatements - The maxStatements to set.
Since:
4.3

getMinPoolSize

public int getMinPoolSize()
Returns:
Returns the minPoolSize.
Since:
4.3

setMinPoolSize

public void setMinPoolSize(int minPoolSize)
Parameters:
minPoolSize - The minPoolSize to set.
Since:
4.3

getPropertyCycle

public int getPropertyCycle()
Returns:
Returns the propertyCycle.
Since:
4.3

setPropertyCycle

public void setPropertyCycle(int propertyCycle)
Parameters:
propertyCycle - The propertyCycle to set.
Since:
4.3


Copyright © 2009. All Rights Reserved.