yawda.utils.cayenne
Class JNDIDatasourceFactory
java.lang.Object
yawda.utils.cayenne.JNDIDatasourceFactory
- All Implemented Interfaces:
- org.objectstyle.cayenne.conf.DataSourceFactory
- public final class JNDIDatasourceFactory
- extends Object
- implements org.objectstyle.cayenne.conf.DataSourceFactory
- Author:
- Quentin Anciaux
|
Field Summary |
protected org.objectstyle.cayenne.conf.Configuration |
parentConfig
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parentConfig
protected org.objectstyle.cayenne.conf.Configuration parentConfig
JNDIDatasourceFactory
public JNDIDatasourceFactory()
throws Exception
getDataSource
public final DataSource getDataSource(String location)
throws Exception
- Returns DataSource object corresponding to
location.
Location is expected to be a path mapped in JNDI InitialContext.
- Specified by:
getDataSource in interface org.objectstyle.cayenne.conf.DataSourceFactory
- Throws:
Exception
initializeWithParentConfiguration
public final void initializeWithParentConfiguration(org.objectstyle.cayenne.conf.Configuration conf)
- Specified by:
initializeWithParentConfiguration in interface org.objectstyle.cayenne.conf.DataSourceFactory
getDataSource
public final DataSource getDataSource(String location,
org.apache.log4j.Level logLevel)
throws Exception
- Specified by:
getDataSource in interface org.objectstyle.cayenne.conf.DataSourceFactory
- Throws:
Exception