Package org.pentaho.platform.api.data
Interface IDBDatasourceService
-
- All Known Subinterfaces:
IJndiDatasourceService,IPooledDatasourceService
public interface IDBDatasourceServiceThis interface defines Pentaho's DatasourceService API. You should implement it if you want to create your own DB data sources management system.- Author:
- Ramaiz Mansoor (rmansoor@pentaho.org)
-
-
Field Summary
Fields Modifier and Type Field Description static StringACCESS_TO_UNDERLYING_CONNECTION_ALLOWEDstatic StringDEFAULT_AUTO_COMMITstatic StringDEFAULT_CATALOGstatic StringDEFAULT_READ_ONLYstatic StringDEFAULT_TRANSACTION_ISOLATIONstatic StringIDBDATASOURCE_SERVICEstatic StringINITIAL_SIZEstatic StringJDBC_DATASOURCEstatic StringJDBC_POOLstatic StringLOG_ABANDONEDstatic StringMAX_ACTIVE_KEYstatic StringMAX_IDLE_KEYstatic StringMAX_OPEN_PREPARED_STATEMENTSstatic StringMAX_WAIT_KEYstatic StringMIN_IDLE_KEYstatic StringPOOL_PREPARED_STATEMENTSstatic StringQUERY_KEYstatic StringREMOVE_ABANDONEDstatic StringREMOVE_ABANDONED_TIMEOUTstatic StringTEST_ON_BORROWstatic StringTEST_ON_RETURNstatic StringTEST_WHILE_IDLEstatic StringTIME_BETWEEN_EVICTION_RUNS_MILLISstatic StringTRANSACTION_ISOLATION_NONE_VALUE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclearCache()This method clears the whole JNDI data source cache.voidclearDataSource(String dsName)This method clears the specified JNDI data source from cache.DataSourcegetDataSource(String dsName)Since JNDI is supported in different ways by different application servers, it's nearly impossible to have a standard way to look up a data source.StringgetDSBoundName(String dsName)Since JNDI is supported in different ways by different application servers, it's nearly impossible to have a standard way to look up a data source.StringgetDSUnboundName(String dsName)Since JNDI is supported in different ways by different application servers, it's nearly impossible to have a standard way to look up a data source.DataSourceresolveDatabaseConnection(org.pentaho.database.model.IDatabaseConnection databaseConnection)
-
-
-
Field Detail
-
JDBC_POOL
static final String JDBC_POOL
- See Also:
- Constant Field Values
-
JDBC_DATASOURCE
static final String JDBC_DATASOURCE
- See Also:
- Constant Field Values
-
IDBDATASOURCE_SERVICE
static final String IDBDATASOURCE_SERVICE
- See Also:
- Constant Field Values
-
MAX_ACTIVE_KEY
static final String MAX_ACTIVE_KEY
- See Also:
- Constant Field Values
-
MAX_IDLE_KEY
static final String MAX_IDLE_KEY
- See Also:
- Constant Field Values
-
MIN_IDLE_KEY
static final String MIN_IDLE_KEY
- See Also:
- Constant Field Values
-
MAX_WAIT_KEY
static final String MAX_WAIT_KEY
- See Also:
- Constant Field Values
-
QUERY_KEY
static final String QUERY_KEY
- See Also:
- Constant Field Values
-
TEST_ON_BORROW
static final String TEST_ON_BORROW
- See Also:
- Constant Field Values
-
TEST_WHILE_IDLE
static final String TEST_WHILE_IDLE
- See Also:
- Constant Field Values
-
TEST_ON_RETURN
static final String TEST_ON_RETURN
- See Also:
- Constant Field Values
-
DEFAULT_READ_ONLY
static final String DEFAULT_READ_ONLY
- See Also:
- Constant Field Values
-
DEFAULT_AUTO_COMMIT
static final String DEFAULT_AUTO_COMMIT
- See Also:
- Constant Field Values
-
DEFAULT_TRANSACTION_ISOLATION
static final String DEFAULT_TRANSACTION_ISOLATION
- See Also:
- Constant Field Values
-
TRANSACTION_ISOLATION_NONE_VALUE
static final String TRANSACTION_ISOLATION_NONE_VALUE
- See Also:
- Constant Field Values
-
DEFAULT_CATALOG
static final String DEFAULT_CATALOG
- See Also:
- Constant Field Values
-
POOL_PREPARED_STATEMENTS
static final String POOL_PREPARED_STATEMENTS
- See Also:
- Constant Field Values
-
MAX_OPEN_PREPARED_STATEMENTS
static final String MAX_OPEN_PREPARED_STATEMENTS
- See Also:
- Constant Field Values
-
ACCESS_TO_UNDERLYING_CONNECTION_ALLOWED
static final String ACCESS_TO_UNDERLYING_CONNECTION_ALLOWED
- See Also:
- Constant Field Values
-
TIME_BETWEEN_EVICTION_RUNS_MILLIS
static final String TIME_BETWEEN_EVICTION_RUNS_MILLIS
- See Also:
- Constant Field Values
-
REMOVE_ABANDONED
static final String REMOVE_ABANDONED
- See Also:
- Constant Field Values
-
REMOVE_ABANDONED_TIMEOUT
static final String REMOVE_ABANDONED_TIMEOUT
- See Also:
- Constant Field Values
-
LOG_ABANDONED
static final String LOG_ABANDONED
- See Also:
- Constant Field Values
-
INITIAL_SIZE
static final String INITIAL_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
clearCache
void clearCache()
This method clears the whole JNDI data source cache. The need exists because after a JNDI connection is edited the old data source must be removed from the cache.
-
clearDataSource
void clearDataSource(String dsName)
This method clears the specified JNDI data source from cache. The need exists because after a JNDI connection is edited the old data source must be removed from the cache.- Parameters:
dsName- The name of the data source to be removed from the cache.
-
getDataSource
DataSource getDataSource(String dsName) throws DBDatasourceServiceException
Since JNDI is supported in different ways by different application servers, it's nearly impossible to have a standard way to look up a data source. This method hides all of the lookups that may be required to find a JNDI name.- Parameters:
dsName- The data source name.- Returns:
- Returns DataSource if there is one bound in JNDI.
- Throws:
DBDatasourceServiceException
-
getDSBoundName
String getDSBoundName(String dsName) throws DBDatasourceServiceException
Since JNDI is supported in different ways by different application servers, it's nearly impossible to have a standard way to look up a data source. This method hides all the lookups that may be required to find a JNDI name, and returns the actual bound name.- Parameters:
dsName- The Datasource name (e.g. SampleData).- Returns:
- Returns the bound data source name if it is bound in JNDI (e.g. "jdbc/SampleData").
- Throws:
DBDatasourceServiceException
-
getDSUnboundName
String getDSUnboundName(String dsName)
Since JNDI is supported in different ways by different application servers, it's nearly impossible to have a standard way to look up a data source. This method extracts the regular name of a specified JNDI source.- Parameters:
dsName- The data source name (e.g. "jdbc/SampleData").- Returns:
- Returns the unbound data source name (e.g. "SampleData").
-
resolveDatabaseConnection
DataSource resolveDatabaseConnection(org.pentaho.database.model.IDatabaseConnection databaseConnection) throws DBDatasourceServiceException
- Throws:
DBDatasourceServiceException
-
-