org.apache.synapse.commons.datasource
Class JNDIBasedDataSourceRepository

java.lang.Object
  extended by 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
JNDIBasedDataSourceRepository()
           
 
Method Summary
 void clear()
          Clear already registered datasources
 void init(Properties jndiEnv)
          Initialization with given properties
 boolean isInitialized()
          Explicitly check for init
 DataSource lookUp(String dsName)
          Get a DatSource which has been registered in the JNDI tree
 void register(DataSourceInformation information)
          Register a DataSource in the JNDI tree
 void unRegister(String name)
          Removing datasource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JNDIBasedDataSourceRepository

public JNDIBasedDataSourceRepository()
Method Detail

init

public void init(Properties jndiEnv)
Description copied from interface: DataSourceRepository
Initialization with given properties

Specified by:
init in interface DataSourceRepository
Parameters:
jndiEnv - configuration properties

register

public void register(DataSourceInformation information)
Register a DataSource in the JNDI tree

Specified by:
register in interface DataSourceRepository
Parameters:
information - DataSourceInformation instance
See Also:
DataSourceRepository.register(DataSourceInformation)

unRegister

public void unRegister(String name)
Description copied from interface: DataSourceRepository
Removing datasource

Specified by:
unRegister in interface DataSourceRepository
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:
lookUp in interface DataSourceRepository
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: DataSourceRepository
Clear already registered datasources

Specified by:
clear in interface DataSourceRepository

isInitialized

public boolean isInitialized()
Description copied from interface: DataSourceRepository
Explicitly check for init

Specified by:
isInitialized in interface DataSourceRepository
Returns:
True , if has already initialized


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.