Files
alfresco-community-repo/config/alfresco/avm-test-context.xml
2006-07-05 16:16:09 +00:00

102 lines
3.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING/DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<!-- Use substitution values in this config. -->
<bean id="configurationProperties"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>config/alfresco/avm-test.properties</value>
</list>
</property>
</bean>
<!-- Datasource -->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
<property name="driverClass">
<value>${db.driver}</value>
</property>
<property name="jdbcUrl">
<value>${db.url}</value>
</property>
<property name="user">
<value>${db.username}</value>
</property>
<property name="password">
<value>${db.password}</value>
</property>
<property name="initialPoolSize">
<value>${db.pool.initial}</value>
</property>
<property name="maxPoolSize" >
<value>${db.pool.max}</value>
</property>
<property name="numHelperThreads">
<value>1</value>
</property>
<property name="idleConnectionTestPeriod">
<value>60</value>
</property>
</bean>
<!-- The SessionFactory for hibernate. -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource"/>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
<prop key="hibernate.current_session_context_class">${hibernate.current_session_context_class}</prop>
<prop key="hibernate.connection.isolation">${hibernate.connection.isolation}</prop>
<prop key="hibernate.default_batch_fetch_size">${hibernate.default_batch_fetch_size}</prop>
<prop key="hibernate.jdbc.batch_versioned_data">${hibernate.jdbc.batch_versioned_data}</prop>
<prop key="hibernate.cache.use_second_level_cache">${hibernate.cache.use_second_level_cache}</prop>
<prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>org/alfresco/repo/avm/hibernate/AVM.hbm.xml</value>
</list>
</property>
</bean>
<!-- The Hibernate Transaction wrapper. -->
<bean id="hibernateTxn" class="org.alfresco.repo.avm.hibernate.HibernateTxn">
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>
</bean>
<bean id="orphanReaper" class="org.alfresco.repo.avm.OrphanReaper"
init-method="init" destroy-method="shutDown" depends-on="avmService">
<property name="inactiveBaseSleep">
<value>4000</value>
</property>
<property name="activeBaseSleep">
<value>1000</value>
</property>
<property name="batchSize">
<value>50</value>
</property>
<property name="hibernateTxn">
<ref bean="hibernateTxn"/>
</property>
</bean>
<bean id="avmService" class="org.alfresco.repo.avm.AVMServiceImpl"
init-method="init">
<property name="storage">
<value>build/test-results/storage</value>
</property>
<property name="initialize">
<value>${avm.initialize}</value>
</property>
<property name="hibernateTxn">
<ref bean="hibernateTxn"/>
</property>
</bean>
</beans>