Interface DataSourceService
-
- All Known Implementing Classes:
JndiDataSourceService
public interface DataSourceService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.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.
-
-
-
Method Detail
-
clearCache
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.
-
clearDataSource
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.
-
getDataSource
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:
DatasourceServiceException
-
getDSBoundName
String getDSBoundName(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, and return the actual bound name.- Parameters:
dsName
- The Datasource name (like SampleData)- Returns:
- The bound DS name if it is bound in JNDI (like "jdbc/SampleData")
- Throws:
DatasourceServiceException
-
-