|
|||||||||
| 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 org.xml.sax.XMLReader |
parser
|
| Constructor Summary | |
|---|---|
DriverDataSourceFactory()
Creates new DriverDataSourceFactory. |
|
| Method Summary | |
|---|---|
javax.sql.DataSource |
getDataSource(java.lang.String location)
Returns DataSource object corresponding to location. |
javax.sql.DataSource |
getDataSource(java.lang.String location,
org.apache.log4j.Level logLevel)
Deprecated. since 1.2 |
protected DataSourceInfo |
getDriverInfo()
Returns DataSourceInfo property. |
protected java.io.InputStream |
getInputStream(java.lang.String location)
|
void |
initializeWithParentConfiguration(Configuration parentConfiguration)
Stores configuration object internally to use it later for resource loading. |
protected void |
load(java.lang.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 org.xml.sax.XMLReader parser
protected DataSourceInfo driverInfo
protected Configuration parentConfiguration
| Constructor Detail |
|---|
public DriverDataSourceFactory()
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
public void initializeWithParentConfiguration(Configuration parentConfiguration)
initializeWithParentConfiguration in interface DataSourceFactory
public javax.sql.DataSource getDataSource(java.lang.String location,
org.apache.log4j.Level logLevel)
throws java.lang.Exception
getDataSource in interface DataSourceFactoryjava.lang.Exception
public javax.sql.DataSource getDataSource(java.lang.String location)
throws java.lang.Exception
DataSourceFactorylocation. Concrete
implementations may treat location differently - as a file path, JNDI location,
etc.
getDataSource in interface DataSourceFactoryjava.lang.Exceptionprotected DataSourceInfo getDriverInfo()
protected java.io.InputStream getInputStream(java.lang.String location)
protected void load(java.lang.String location)
throws java.lang.Exception
location. Called
internally from "getDataSource"
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||