Move HSQLDB checkpoint/shutdown to a bean specific to the legacy profile

This commit is contained in:
François-Xavier Thomas
2019-03-09 13:33:59 +01:00
parent b88bdb37c9
commit 76e8abd219
7 changed files with 77 additions and 107 deletions
@@ -6,11 +6,17 @@
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
<property name="url"
value="#{T(org.airsonic.player.service.SettingsService).defaultJDBCUrl}" />
<property name="username" value="sa" />
<property name="password" value="" />
</bean>
</beans>
<!-- Overwrite the GenericDaoHelper bean defined in applicationContext-db.xml -->
<!-- This bean is specific to the legacy embedded HSQLDB database -->
<bean id="daoHelper" class="org.airsonic.player.dao.LegacyHsqlDaoHelper">
<constructor-arg name="dataSource" ref="dataSource" />
</bean>
</beans>
@@ -3,12 +3,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
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">
<import resource="applicationContext-db-jndi.xml" />
<import resource="applicationContext-db-embed.xml" />
<import resource="applicationContext-db-legacy.xml" />
<tx:annotation-driven/>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<constructor-arg ref="dataSource"/>
</bean>
@@ -17,6 +11,12 @@
<constructor-arg name="dataSource" ref="dataSource" />
</bean>
<import resource="applicationContext-db-jndi.xml" />
<import resource="applicationContext-db-embed.xml" />
<import resource="applicationContext-db-legacy.xml" />
<tx:annotation-driven/>
<bean id="rollbackFile" class="java.io.File">
<constructor-arg type="java.io.File" index="0" value="#{T(org.airsonic.player.service.SettingsService).airsonicHome}" />
<constructor-arg type="java.lang.String" index="1" value="rollback.sql" />
@@ -38,4 +38,4 @@
</map>
</property>
</bean>
</beans>
</beans>