eXo Kernel :: Component :: Common Service 2.4.x-SNAPSHOT

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
 DataSource getDataSource(String dataSourceName)
          Try to get the data source from a lookup, if it can't a NamingException will be thrown
 boolean isManaged(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 a NamingException will be thrown

Parameters:
dataSourceName - the name of the data source to lookup
Returns:
the DataSource found thanks to the lookup. The original object could be wrap to another DataSource in 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:
true if the data source is managed, false otherwise

eXo Kernel :: Component :: Common Service 2.4.x-SNAPSHOT

Copyright © 2015 eXo Platform SAS. All Rights Reserved.