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
 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 use and implement "getDataSource(String)" instead.
 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

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

Throws:
java.lang.Exception

getDataSource

javax.sql.DataSource getDataSource(java.lang.String location,
                                   org.apache.log4j.Level logLevel)
                                   throws java.lang.Exception
Deprecated. since 1.2 use and implement "getDataSource(String)" instead.

Throws:
java.lang.Exception


Copyright © 2001-2006 Apache.org All Rights Reserved.