Package org.exoplatform.services.jdbc
Interface DataSourceProvider
-
- All Known Implementing Classes:
DataSourceProviderImpl
public interface DataSourceProviderThis provider is used to get aDataSourcein an uniform manner. It allows to wrap theDataSourcein case it is defined as managed- Version:
- $Id$
- Author:
- Nicolas Filotto
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DataSourcegetDataSource(String dataSourceName)Try to get the data source from a lookup, if it can't aNamingExceptionwill be thrownbooleanisManaged(String dataSourceName)Indicates whether or not the given data source is managed
-
-
-
Method Detail
-
getDataSource
DataSource getDataSource(String dataSourceName) throws NamingException
Try to get the data source from a lookup, if it can't aNamingExceptionwill be thrown- Parameters:
dataSourceName- the name of the data source to lookup- Returns:
- the
DataSourcefound thanks to the lookup. The original object could be wrap to anotherDataSourcein order to support managed data source. - Throws:
NamingException- if the data source could not be found
-
isManaged
boolean isManaged(String dataSourceName)
Indicates whether or not the given data source is managed- Parameters:
dataSourceName- the data source to check- Returns:
trueif the data source is managed,falseotherwise
-
-