public abstract class BaseDatasourceService extends Object implements org.pentaho.platform.api.data.IDBDatasourceService
ACCESS_TO_UNDERLYING_CONNECTION_ALLOWED, DEFAULT_AUTO_COMMIT, DEFAULT_CATALOG, DEFAULT_READ_ONLY, DEFAULT_TRANSACTION_ISOLATION, IDBDATASOURCE_SERVICE, INITIAL_SIZE, JDBC_DATASOURCE, JDBC_POOL, LOG_ABANDONED, MAX_ACTIVE_KEY, MAX_IDLE_KEY, MAX_OPEN_PREPARED_STATEMENTS, MAX_WAIT_KEY, MIN_IDLE_KEY, POOL_PREPARED_STATEMENTS, QUERY_KEY, REMOVE_ABANDONED, REMOVE_ABANDONED_TIMEOUT, TEST_ON_BORROW, TEST_ON_RETURN, TEST_WHILE_IDLE, TIME_BETWEEN_EVICTION_RUNS_MILLIS, TRANSACTION_ISOLATION_NONE_VALUE
Constructor and Description |
---|
BaseDatasourceService() |
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
This method clears the JNDI DS cache.
|
void |
clearDataSource(String dsName)
This method clears the JNDI DS cache.
|
org.pentaho.platform.api.engine.ICacheManager |
getCacheManager() |
DataSource |
getDataSource(String dsName) |
org.pentaho.platform.api.repository.datasource.IDatasourceMgmtService |
getDatasourceMgmtService() |
String |
getDSBoundName(String dsName)
Since JNDI is supported different ways in different app servers, it's nearly impossible to have a ubiquitous
way to look up a datasource.
|
String |
getDSUnboundName(String dsName)
Since JNDI is supported different ways in different app servers, it's nearly impossible to have a ubiquitous
way to look up a datasource.
|
protected DataSource |
getJndiDataSource(String dsName) |
protected DataSource |
resolveDatabaseConnection(org.pentaho.database.model.IDatabaseConnection databaseConnection)
This should have been abstract, but changes to this API at a point release is not advised.
|
protected DataSource |
retrieve(String name)
This should have been abstract, but changes to this API at a point release is not advised.
|
public void clearCache()
clearCache
in interface org.pentaho.platform.api.data.IDBDatasourceService
public void clearDataSource(String dsName)
clearDataSource
in interface org.pentaho.platform.api.data.IDBDatasourceService
public DataSource getDataSource(String dsName) throws org.pentaho.platform.api.data.DBDatasourceServiceException
getDataSource
in interface org.pentaho.platform.api.data.IDBDatasourceService
org.pentaho.platform.api.data.DBDatasourceServiceException
protected DataSource retrieve(String name) throws org.pentaho.platform.api.data.DBDatasourceServiceException
name
- name of JNDI referenceorg.pentaho.platform.api.data.DBDatasourceServiceException
protected DataSource resolveDatabaseConnection(org.pentaho.database.model.IDatabaseConnection databaseConnection) throws org.pentaho.platform.api.data.DBDatasourceServiceException
databaseConnection
- org.pentaho.platform.api.data.DBDatasourceServiceException
protected DataSource getJndiDataSource(String dsName) throws org.pentaho.platform.api.data.DBDatasourceServiceException
org.pentaho.platform.api.data.DBDatasourceServiceException
public String getDSBoundName(String dsName) throws org.pentaho.platform.api.data.DBDatasourceServiceException
getDSBoundName
in interface org.pentaho.platform.api.data.IDBDatasourceService
dsName
- The Datasource name (like SampleData)org.pentaho.platform.api.data.DBDatasourceServiceException
public String getDSUnboundName(String dsName)
getDSUnboundName
in interface org.pentaho.platform.api.data.IDBDatasourceService
dsName
- The Datasource name (like "jdbc/SampleData")public org.pentaho.platform.api.engine.ICacheManager getCacheManager()
public org.pentaho.platform.api.repository.datasource.IDatasourceMgmtService getDatasourceMgmtService()
Copyright © 2019 Hitachi Vantara. All rights reserved.