org.apache.cayenne.conf
Class JNDIDataSourceFactory
java.lang.Object
org.apache.cayenne.conf.JNDIDataSourceFactory
- All Implemented Interfaces:
- DataSourceFactory
public class JNDIDataSourceFactory
- extends Object
- implements DataSourceFactory
Looks up DataSource objects via JNDI.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parentConfig
protected Configuration parentConfig
JNDIDataSourceFactory
public JNDIDataSourceFactory()
initializeWithParentConfiguration
public void initializeWithParentConfiguration(Configuration conf)
- Description copied from interface:
DataSourceFactory
- Initializes factory with the parent configuration object.
- Specified by:
initializeWithParentConfiguration
in interface DataSourceFactory
getDataSource
public DataSource getDataSource(String location)
throws Exception
- Attempts to load DataSource using JNDI. In case of failure tries to get the
DataSource with the same name from CayenneModeler preferences.
- Specified by:
getDataSource
in interface DataSourceFactory
- Throws:
Exception
Copyright © 2001-2011 Apache Cayenne. All Rights Reserved.