com.jfw.database
Class DataSourceProxy

java.lang.Object
  extended by com.jfw.database.DataSourceProxy

public final class DataSourceProxy
extends java.lang.Object

Distribute data sources.


Constructor Summary
DataSourceProxy()
           
 
Method Summary
static javax.sql.DataSource get(java.lang.String dsName)
          Get a data source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceProxy

public DataSourceProxy()
Method Detail

get

public static javax.sql.DataSource get(java.lang.String dsName)
                                throws java.lang.Exception
Get a data source.
If the requested data source not exist in dataSources then the method create(java.lang.String) is called for get one.

Parameters:
dsName - the data source name as defined in key db_resources_names of file jfw.properties.
Returns:
a DataSource object.
Throws:
java.lang.Exception