Class JNDIBasedDataSourceRepository
- java.lang.Object
-
- org.apache.synapse.commons.datasource.JNDIBasedDataSourceRepository
-
- All Implemented Interfaces:
DataSourceRepository
public class JNDIBasedDataSourceRepository extends Object implements DataSourceRepository
Keep all DataSources in the JNDI Tree
-
-
Constructor Summary
Constructors Constructor Description JNDIBasedDataSourceRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clear already registered datasourcesvoidinit(Properties jndiEnv)Initialization with given propertiesbooleanisInitialized()Explicitly check for initDataSourcelookUp(String dsName)Get a DatSource which has been registered in the JNDI treevoidregister(DataSourceInformation information)Register a DataSource in the JNDI treevoidunRegister(String name)Removing datasource
-
-
-
Method Detail
-
init
public void init(Properties jndiEnv)
Description copied from interface:DataSourceRepositoryInitialization with given properties- Specified by:
initin interfaceDataSourceRepository- Parameters:
jndiEnv- configuration properties
-
register
public void register(DataSourceInformation information)
Register a DataSource in the JNDI tree- Specified by:
registerin interfaceDataSourceRepository- Parameters:
information- DataSourceInformation instance- See Also:
DataSourceRepository.register(DataSourceInformation)
-
unRegister
public void unRegister(String name)
Description copied from interface:DataSourceRepositoryRemoving datasource- Specified by:
unRegisterin interfaceDataSourceRepository- Parameters:
name- name of the datasource to be removed
-
lookUp
public DataSource lookUp(String dsName)
Get a DatSource which has been registered in the JNDI tree- Specified by:
lookUpin interfaceDataSourceRepository- Parameters:
dsName- Name of the DataSource to be looked up- Returns:
- DataSource Instance
- See Also:
DataSourceRepository.lookUp(String)
-
clear
public void clear()
Description copied from interface:DataSourceRepositoryClear already registered datasources- Specified by:
clearin interfaceDataSourceRepository
-
isInitialized
public boolean isInitialized()
Description copied from interface:DataSourceRepositoryExplicitly check for init- Specified by:
isInitializedin interfaceDataSourceRepository- Returns:
- True , if has already initialized
-
-