snarasim
Mar 1st, 2006, 05:19 PM
I wrote a test that derices from AbstractTransactionalDataSourceSpringContextTests and in the test i made a few insertions into the database. I expected the data to be rolled back after the test run but my mysql db still has the data that i inserted from the test.
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTran sactionManager">
<property name="dataSource">
<ref local="migrationDB"/>
</property>
</bean>
<!--JDBC Config -->
<bean id="migrationDB" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="url">
<value>jdbc:mysql://localhost:3306/dashboard</value>
</property>
<property name="username">
<value>root</value>
</property>
<property name="password">
<value></value>
</property>
</bean>
what am i doing wrong?
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTran sactionManager">
<property name="dataSource">
<ref local="migrationDB"/>
</property>
</bean>
<!--JDBC Config -->
<bean id="migrationDB" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="url">
<value>jdbc:mysql://localhost:3306/dashboard</value>
</property>
<property name="username">
<value>root</value>
</property>
<property name="password">
<value></value>
</property>
</bean>
what am i doing wrong?