org.pentaho.platform.engine.services.connection.datasource.dbcp
Class PooledOrJndiDatasourceService
java.lang.Object
org.pentaho.platform.engine.services.connection.datasource.dbcp.BaseDatasourceService
org.pentaho.platform.engine.services.connection.datasource.dbcp.PooledOrJndiDatasourceService
- All Implemented Interfaces:
- IDatasourceService
- Direct Known Subclasses:
- AbstractTenantAwareDatasourceService
public class PooledOrJndiDatasourceService
- extends BaseDatasourceService
Method Summary |
void |
clearCache()
This method clears the JNDI DS cache. |
void |
clearDataSource(String dsName)
This method clears the JNDI DS cache. |
DataSource |
getDataSource(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. |
PooledOrJndiDatasourceService
public PooledOrJndiDatasourceService()
clearCache
public void clearCache()
- This method clears the JNDI DS cache. The need exists because after a JNDI
connection edit the old DS must be removed from the cache.
- Specified by:
clearCache
in interface IDatasourceService
- Overrides:
clearCache
in class BaseDatasourceService
clearDataSource
public void clearDataSource(String dsName)
- This method clears the JNDI DS cache. The need exists because after a JNDI
connection edit the old DS must be removed from the cache.
- Specified by:
clearDataSource
in interface IDatasourceService
- Overrides:
clearDataSource
in class BaseDatasourceService
getDataSource
public DataSource getDataSource(String dsName)
throws DatasourceServiceException
- Since JNDI is supported different ways in different app servers, it's
nearly impossible to have a ubiquitous way to look up a datasource. This
method is intended to hide all the lookups that may be required to find a
jndi name.
- Parameters:
dsName
- The Datasource name
- Returns:
- DataSource if there is one bound in JNDI
- Throws:
NamingException
DatasourceServiceException