blob: 72cd1a7ef2dab5bbafc3164a271c27e886380633 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!-- Dao implementations based on Spring's hibernate templates -->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:raven="http://taverna.sf.net/schema/artifact-support"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://taverna.sf.net/schema/artifact-support
http://taverna.sf.net/schema/artifact-support/artifact-support.xsd">
<!-- An SPI-enabled hibernate session factory -->
<bean id="t2reference.orm.h3.sessionFactory"
class="net.sf.taverna.platform.spring.orm.hibernate3.SpiRegistryAwareLocalSessionFactoryBean">
<property name="dataSource">
<ref bean="t2reference.jdbc.datasource" />
</property>
<property name="hibernateProperties">
<ref bean="t2reference.orm.h3.properties" />
</property>
<property name="lobHandler">
<bean
class="org.springframework.jdbc.support.lob.DefaultLobHandler" />
</property>
<!-- Need to map the abstract superclass for the SPI first, SPI classes -->
<!-- are subclasses of this and hibernate can be picky about the order -->
<property name="mappingResources">
<list>
<value>
net/sf/taverna/t2/reference/AbstractExternalReference.hbm.xml
</value>
</list>
</property>
<!-- SPI enabled session, uses the linked SPI registry or registries -->
<!-- to gather Class definitions and uses the slightly patched hibernate -->
<!-- to ensure that raven is used to fetch these back when required -->
<property name="spiRegistries">
<list>
<!-- SPI used by the raven-aware hibernate session factory bean -->
<!-- This *must* go before the external reference SPI bean or -->
<!-- those beans won't find the mapping for their superclasses -->
<bean
class="net.sf.taverna.platform.spring.SpiRegistryFactoryBean">
<property name="repository">
<ref bean="raven.repository" />
</property>
<property name="spiClassName"
value="net.sf.taverna.t2.reference.h3.HibernateMappedEntity" />
</bean>
<!-- SPI used by the raven-aware hibernate session factory bean -->
<bean
class="net.sf.taverna.platform.spring.SpiRegistryFactoryBean">
<property name="repository">
<ref bean="raven.repository" />
</property>
<property name="spiClassName"
value="net.sf.taverna.t2.reference.ExternalReferenceSPI" />
</bean>
</list>
</property>
<property name="preloadRegistries">
<list>
<bean
class="net.sf.taverna.platform.spring.SpiRegistryFactoryBean">
<property name="repository">
<ref bean="raven.repository" />
</property>
<property name="spiClassName"
value="net.sf.taverna.t2.reference.h3.HibernateComponentClass" />
</bean>
</list>
</property>
</bean>
<bean id="t2reference.dao.referenceSetDao"
raven:artifact="net.sf.taverna.t2.core:reference-impl:1.1"
raven:repository="raven.repository"
class="net.sf.taverna.t2.reference.impl.HibernateReferenceSetDao">
<property name="sessionFactory">
<ref local="t2reference.orm.h3.sessionFactory" />
</property>
</bean>
<bean id="t2reference.dao.errorDocumentDao"
raven:artifact="net.sf.taverna.t2.core:reference-impl:1.1"
raven:repository="raven.repository"
class="net.sf.taverna.t2.reference.impl.HibernateErrorDocumentDao">
<property name="sessionFactory">
<ref local="t2reference.orm.h3.sessionFactory" />
</property>
</bean>
<bean id="t2reference.dao.listDao"
raven:artifact="net.sf.taverna.t2.core:reference-impl:1.1"
raven:repository="raven.repository"
class="net.sf.taverna.t2.reference.impl.HibernateListDao">
<property name="sessionFactory">
<ref local="t2reference.orm.h3.sessionFactory" />
</property>
</bean>
</beans>