org.apache.cayenne.conf
Interface DataSourceFactory

All Known Implementing Classes:
DBCPDataSourceFactory, DriverDataSourceFactory, JNDIDataSourceFactory, ProjectDataSourceFactory

public interface DataSourceFactory

A pluggable factory for javax.sql.DataSource instances used by Cayenne runtime.


Method Summary
 DataSource getDataSource(String location)
          Returns DataSource object corresponding to location.
 void initializeWithParentConfiguration(Configuration conf)
          Initializes factory with the parent configuration object.
 

Method Detail

initializeWithParentConfiguration

void initializeWithParentConfiguration(Configuration conf)
Initializes factory with the parent configuration object.


getDataSource

DataSource getDataSource(String location)
                         throws Exception
Returns DataSource object corresponding to location. Concrete implementations may treat location differently - as a file path, JNDI location, etc.

Throws:
Exception


Copyright © 2001-2011 Apache Cayenne. All Rights Reserved.