Introduced ContextSourceTransactionManagerDelegate and ContextSourceAndDataSourceTransactionManager.

This commit is contained in:
Mattias Arthursson
2007-02-12 17:30:22 +00:00
parent 760440ae6e
commit 183c18962d

View File

@@ -21,15 +21,14 @@
<property name="dirObjectFactory"
value="org.springframework.ldap.core.DefaultDirObjectFactory" />
</bean>
<!--
<bean id="dataSource"
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
<property name="url" value="jdbc:hsqldb:hsql://localhost/" />
<property name="url" value="jdbc:hsqldb:mem:aname" />
<property name="username" value="sa" />
<property name="password" value="" />
</bean>
-->
</bean>
<bean id="contextSource"
class="org.springframework.ldap.transaction.core.TransactionAwareContextSourceProxy">
@@ -41,40 +40,40 @@
<constructor-arg ref="contextSource" />
</bean>
<!--
<bean id="jdbcTemplate"
<bean id="jdbcTemplate"
class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dataSource" />
</bean>
-->
</bean>
<!--
<bean id="ldapTransactionManager"
class="org.springframework.ldap.transaction.core.ContextSourceTransactionManager">
<property name="contextSource" ref="contextSourceTarget" />
</bean>
<!--
<bean id="dataSourceTransactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
-->
<bean id="transactionManager"
class="org.springframework.ldap.transaction.core.ContextSourceAndDataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
-->
<property name="contextSource" ref="contextSource" />
</bean>
<bean name="dummyDaoTarget"
class="org.springframework.ldap.transaction.core.DummyDaoImpl">
class="org.springframework.ldap.transaction.core.LdapAndJdbcDummyDaoImpl">
<property name="ldapTemplate" ref="ldapTemplate" />
<!--
<property name="jdbcTemplate" ref="jdbcTemplate" />
-->
<property name="jdbcTemplate" ref="jdbcTemplate" />
</bean>
<bean name="dummyDao"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager"
ref="ldapTransactionManager" />
ref="transactionManager" />
<property name="target" ref="dummyDaoTarget" />
<property name="transactionAttributes">
<props>
<prop key="*">PROPAGATION_REQUIRED</prop>
<prop key="*">PROPAGATION_REQUIRES_NEW</prop>
</props>
</property>
</bean>