awips2/tests/resources/unit-test-db-beans.xml
Dustin Johnson bc830e67f0 Issue #2038 Change registry code to use GenericRegistry, use Spring 3 embedded DB feature in tests
Change-Id: Ie9e0a4fa4fb457f1d85326c6c2ddcfa16cdc5b63

Former-commit-id: 121d9a02acfe528c524788a062c2d2034f80afe5
2013-06-03 14:54:53 -05:00

46 lines
No EOL
2.1 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd">
<bean id="metadataSessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="packagesToScan">
<list>
<value>com.raytheon.uf.edex.datadelivery.bandwidth.dao</value>
<value>com.raytheon.uf.edex.datadelivery.retrieval.db</value>
<value>oasis.names.tc.ebxml.regrep.xsd.rim.v4</value>
</list>
</property>
<property name="configLocation">
<value>classpath:unit-test-hibernate.cfg.xml</value>
</property>
</bean>
<tx:annotation-driven transaction-manager="metadataTxManager"
proxy-target-class="true" />
<bean id="metadataTxManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="metadataSessionFactory" />
</bean>
<bean id="metadataTxTemplate"
class="org.springframework.transaction.support.TransactionTemplate">
<property name="transactionManager" ref="metadataTxManager" />
</bean>
<!-- Register the application context with EDEXUtil -->
<bean class="com.raytheon.uf.edex.core.EDEXUtil" />
<jdbc:embedded-database id="dataSource" type="H2">
<jdbc:script location="classpath:schema.sql"/>
</jdbc:embedded-database>
</beans>