How to enable custom isolation levels for the DataSourceTransactionManager?
I have the following in my spring configuration file.
<bean id="transactionManager"class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="myDataDource"/>
</bean>
<bean id="myTransactionProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" abstract="true" lazy-init="false" autowire="default" dependency-check="default">
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="transactionAttributes">
<props>
<prop key="cancel">PROPAGATION_REQUIRED,ISOLATION_READ_UNCOMMITTED,timeout_25,-Exception</prop>
</props>
</property>
</bean>
But when I try to run it, it gives me the following error.
org.springframework.transaction.InvalidIsolationLevelException: JtaTransactionManager does not support custom isolation levels by default - switch 'allowCustomIsolationLevels' to 'true'
I am not using the JtaTransactionManager, why I got a warning about this? And how do I enable the custom isolation level for the DataSourceTransactionManager? In documentation, it was mentioned that this class would support the custom isolation levels, but I didn't find any examples online. Most of it are only for the JtaTransactionManager. Just wonder if anyone can help me out for this. Thanks.