Package org.exoplatform.services.jdbc
Interface DataSourceProvider
- All Known Implementing Classes:
DataSourceProviderImpl
public interface DataSourceProvider
This provider is used to get a
DataSource in an uniform manner.
It allows to wrap the DataSource in case it is defined as managed- Version:
- $Id$
- Author:
- Nicolas Filotto
-
Method Summary
Modifier and TypeMethodDescriptiongetDataSource(String dataSourceName) Try to get the data source from a lookup, if it can't aNamingExceptionwill be thrownbooleanIndicates whether or not the given data source is managed
-
Method Details
-
getDataSource
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
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
-