About Pre-bound JDBC Connection found! HibernateTransactionManager does not abnormal Summary

Yesterday to help his girlfriend to configure ssh framework of multiple data sources, the thought of this already very familiar with, finished configuring other fault'd find it acceptable, adjusting just fine. Except Pre-bound JDBC Connection found! HibernateTransactionManager does not really wasted the exception me some time.

Baidu also see the Internet, said that because of the use hibernate and spring jdbc two transaction management in the code at the same time lead, so start put the focus in the code, but the code does not check the problem ah N times, and finally it is impossible to find Configuring a good place to start than right, tried several times I realized that the head of xml file configuration transaction does not, replace the following just fine. The reason: less transactional schema / tx.xsd and schma / tx / spring-tx.xsd and schema / aop / spring-aop.xsd to declare the use of the previous configuration. Here the record about the desire to help small partners have the same abnormality.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:aop="http://www.springframework.org/schema/aop" xmlns="http://www.springframework.org/schema/beans"
       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
   http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd"
>

 

Guess you like

Origin www.cnblogs.com/qiaoyutao/p/10978438.html