spring + ibatis 发生异常事务不回滚,请大师们多关注下。 10
applicationcontext.xml配置如下:<beans><beanid="dataSource"class="org.logicalcobwebs.proxo...
applicationcontext.xml配置如下:
<beans>
<bean id="dataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource">
<property name="alias" value="pool_ktv"/>
<property name="maximumActiveTime" value="60000"/>
<property name="prototypeCount" value="0"/>
<property name="maximumConnectionCount" value="300"/>
<property name="minimumConnectionCount" value="2"/>
<property name="simultaneousBuildThrottle" value="50"/>
<property name="houseKeepingTestSql" value="select CURRENT_DATE from dual"/>
<property name="testBeforeUse" value="true"/>
<property name="testAfterUse" value="true"/>
</bean>
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter">
<bean
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="ORACLE" />
<property name="showSql" value="true" />
<property name="generateDdl" value="false" />
</bean>
</property>
</bean> 展开
<beans>
<bean id="dataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource">
<property name="alias" value="pool_ktv"/>
<property name="maximumActiveTime" value="60000"/>
<property name="prototypeCount" value="0"/>
<property name="maximumConnectionCount" value="300"/>
<property name="minimumConnectionCount" value="2"/>
<property name="simultaneousBuildThrottle" value="50"/>
<property name="houseKeepingTestSql" value="select CURRENT_DATE from dual"/>
<property name="testBeforeUse" value="true"/>
<property name="testAfterUse" value="true"/>
</bean>
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter">
<bean
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="ORACLE" />
<property name="showSql" value="true" />
<property name="generateDdl" value="false" />
</bean>
</property>
</bean> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询