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
Fields Modifier and Type Field Description static String
ACCESS_TO_UNDERLYING_CONNECTION_ALLOWED
static String
DEFAULT_AUTO_COMMIT
static String
DEFAULT_CATALOG
static String
DEFAULT_READ_ONLY
static String
DEFAULT_TRANSACTION_ISOLATION
static String
IDBDATASOURCE_SERVICE
static String
INITIAL_SIZE
static String
JDBC_DATASOURCE
static String
JDBC_POOL
static String
LOG_ABANDONED
static String
MAX_ACTIVE_KEY
static String
MAX_IDLE_KEY
static String
MAX_OPEN_PREPARED_STATEMENTS
static String
MAX_WAIT_KEY
static String
MIN_IDLE_KEY
static String
POOL_PREPARED_STATEMENTS
static String
QUERY_KEY
static String
REMOVE_ABANDONED
static String
REMOVE_ABANDONED_TIMEOUT
static String
TEST_ON_BORROW
static String
TEST_ON_RETURN
static String
TEST_WHILE_IDLE
static String
TIME_BETWEEN_EVICTION_RUNS_MILLIS
static String
TRANSACTION_ISOLATION_NONE_VALUE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clearCache()
This method clears the whole JNDI data source cache.void
clearDataSource(String dsName)
This method clears the specified JNDI data source from cache.DataSource
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.String
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.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.DataSource
resolveDatabaseConnection(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
-
-