org.kuali.rice.core.framework.persistence.ojb
Class RiceDataSourceConnectionFactory

java.lang.Object
  extended by org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl
      extended by org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl
          extended by org.kuali.rice.core.framework.persistence.ojb.RiceDataSourceConnectionFactory
All Implemented Interfaces:
org.apache.ojb.broker.accesslayer.ConnectionFactory

public class RiceDataSourceConnectionFactory
extends org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl


Constructor Summary
RiceDataSourceConnectionFactory()
           
 
Method Summary
static void addBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
           
protected  DataSource getDataSource(String jcdAlias)
          Return the DataSource to use for the given JCD alias.
 Connection lookupConnection(org.apache.ojb.broker.metadata.JdbcConnectionDescriptor jcd)
           
 
Methods inherited from class org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl
checkOutJdbcConnection, releaseJdbcConnection, validateConnection
 
Methods inherited from class org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl
getDbURL, getJcdDescription, getJdbcProperties, getJdbcProperties, initializeJdbcConnection, newConnectionFromDataSource, newConnectionFromDriverManager, releaseAllResources, releaseConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RiceDataSourceConnectionFactory

public RiceDataSourceConnectionFactory()
Method Detail

addBeanFactory

public static void addBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)

lookupConnection

public Connection lookupConnection(org.apache.ojb.broker.metadata.JdbcConnectionDescriptor jcd)
                            throws org.apache.ojb.broker.accesslayer.LookupException
Specified by:
lookupConnection in interface org.apache.ojb.broker.accesslayer.ConnectionFactory
Overrides:
lookupConnection in class org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl
Throws:
org.apache.ojb.broker.accesslayer.LookupException

getDataSource

protected DataSource getDataSource(String jcdAlias)
                            throws org.apache.ojb.broker.accesslayer.LookupException
Return the DataSource to use for the given JCD alias.

This implementation fetches looks for a bean with the JCD alias name in the provided Spring BeanFactory.

Parameters:
jcdAlias - the JCD alias to retrieve a DataSource for
Returns:
the DataSource to use
Throws:
org.apache.ojb.broker.accesslayer.LookupException


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.