org.apache.cocoon.databases.bridge.spring.avalon
Class SpringToAvalonDataSourceBridge

java.lang.Object
  extended byorg.apache.cocoon.databases.bridge.spring.avalon.SpringToAvalonDataSourceBridge
All Implemented Interfaces:
ServiceSelector

public class SpringToAvalonDataSourceBridge
extends Object
implements ServiceSelector

This class replaces standard Avalon's DataSourceSelector to provide access to database connections defined as Spring beans.

Version:
$Id: SpringToAvalonDataSourceBridge.java 587758 2007-10-24 02:55:27Z vgritsenko $

Constructor Summary
SpringToAvalonDataSourceBridge()
           
 
Method Summary
 ServiceSelector getDataSourceSelector()
           
 Map getSpringDataSources()
           
 boolean isSelectable(Object policy)
           
 void release(Object object)
           
 Object select(Object policy)
           
 void setDataSourceSelector(ServiceSelector dataSourceSelector)
           
 void setSpringDataSources(Map springDataSources)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringToAvalonDataSourceBridge

public SpringToAvalonDataSourceBridge()
Method Detail

isSelectable

public boolean isSelectable(Object policy)
Specified by:
isSelectable in interface ServiceSelector

release

public void release(Object object)
Specified by:
release in interface ServiceSelector

select

public Object select(Object policy)
              throws ServiceException
Specified by:
select in interface ServiceSelector
Throws:
ServiceException

getSpringDataSources

public Map getSpringDataSources()

setSpringDataSources

public void setSpringDataSources(Map springDataSources)

getDataSourceSelector

public ServiceSelector getDataSourceSelector()

setDataSourceSelector

public void setDataSourceSelector(ServiceSelector dataSourceSelector)


Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.