Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Field Summary
`protected Configuration` | `parentConfig`

Constructor Summary
`JNDIDataSourceFactory()`

Method Summary
`DataSource` | `getDataSource(String location)` Attempts to load DataSource using JNDI.
`void` | `initializeWithParentConfiguration(Configuration conf)` Initializes factory with the parent configuration object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### parentConfig

    protected Configuration parentConfig

Constructor Detail

### JNDIDataSourceFactory

    public JNDIDataSourceFactory()

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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