Package org.pentaho.platform.api.data
Interface IDBDatasourceService
- All Known Subinterfaces:
IJndiDatasourceService
,IPooledDatasourceService
public interface IDBDatasourceService
This 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
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This method clears the whole JNDI data source cache.void
clearDataSource
(String dsName) This method clears the specified JNDI data source from cache.getDataSource
(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.getDSBoundName
(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.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.resolveDatabaseConnection
(org.pentaho.database.model.IDatabaseConnection databaseConnection)
-
Field Details
-
JDBC_POOL
- See Also:
-
JDBC_DATASOURCE
- See Also:
-
IDBDATASOURCE_SERVICE
- See Also:
-
MAX_ACTIVE_KEY
- See Also:
-
MAX_IDLE_KEY
- See Also:
-
MIN_IDLE_KEY
- See Also:
-
MAX_WAIT_KEY
- See Also:
-
QUERY_KEY
- See Also:
-
TEST_ON_BORROW
- See Also:
-
TEST_WHILE_IDLE
- See Also:
-
TEST_ON_RETURN
- See Also:
-
DEFAULT_READ_ONLY
- See Also:
-
DEFAULT_AUTO_COMMIT
- See Also:
-
DEFAULT_TRANSACTION_ISOLATION
- See Also:
-
TRANSACTION_ISOLATION_NONE_VALUE
- See Also:
-
DEFAULT_CATALOG
- See Also:
-
POOL_PREPARED_STATEMENTS
- See Also:
-
MAX_OPEN_PREPARED_STATEMENTS
- See Also:
-
ACCESS_TO_UNDERLYING_CONNECTION_ALLOWED
- See Also:
-
TIME_BETWEEN_EVICTION_RUNS_MILLIS
- See Also:
-
REMOVE_ABANDONED
- See Also:
-
REMOVE_ABANDONED_TIMEOUT
- See Also:
-
LOG_ABANDONED
- See Also:
-
INITIAL_SIZE
- See Also:
-
-
Method Details
-
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
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
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
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
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
-