| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cayenne.conf.DriverDataSourceFactory
public class DriverDataSourceFactory
Creates DataSource objects from XML configuration files that describe a JDBC driver. Wraps JDBC driver in a generic DataSource implementation.
| Field Summary | |
|---|---|
| protected  DataSourceInfo | driverInfo | 
| protected  Configuration | parentConfiguration | 
| protected  XMLReader | parser | 
| Constructor Summary | |
|---|---|
| DriverDataSourceFactory()Creates new DriverDataSourceFactory. | |
| Method Summary | |
|---|---|
|  DataSource | getDataSource(String location)Returns DataSource object corresponding to location. | 
| protected  DataSourceInfo | getDriverInfo()Returns DataSourceInfo property. | 
| protected  InputStream | getInputStream(String location) | 
|  void | initializeWithParentConfiguration(Configuration parentConfiguration)Stores configuration object internally to use it later for resource loading. | 
| protected  void | load(String location)Loads driver information from the file at location. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected XMLReader parser
protected DataSourceInfo driverInfo
protected Configuration parentConfiguration
| Constructor Detail | 
|---|
public DriverDataSourceFactory()
                        throws Exception
Exception| Method Detail | 
|---|
public void initializeWithParentConfiguration(Configuration parentConfiguration)
initializeWithParentConfiguration in interface DataSourceFactory
public DataSource getDataSource(String location)
                         throws Exception
DataSourceFactorylocation. Concrete
 implementations may treat location differently - as a file path, JNDI location,
 etc.
getDataSource in interface DataSourceFactoryExceptionprotected DataSourceInfo getDriverInfo()
protected InputStream getInputStream(String location)
protected void load(String location)
             throws Exception
location. Called
 internally from "getDataSource"
Exception| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||