Я работаю над проектом, который использует Java, Spring и Hibernate. Я просто натолкнулся на такую ситуацию.Проблема с подключением SQL
боб 1:
<bean id="cat" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="proxyInterfaces">
<list>
<value>cat</value>
</list>
</property>
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributeSource">
<ref bean="attributeSource"/>
</property>
</bean>
боб 2:
<bean id="dog" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="proxyInterfaces">
<list>
<value>dog</value>
</list>
</property>
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributeSource">
<ref bean="attributeSource"/>
</property>
</bean>
, но при выполнении получаю следующее исключение
org.springframework.jdbc.support.SQLErrorCodesFactory] Error while extracting database product name - falling back to empty error codes
org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data;
nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection;
nested exception is java.sql.SQLException: Connection has already been created in this tx context for pool Illegal attempt to create connection from another pool
Caused by:
at weblogic.jdbc.jts.Driver.getExistingConnection(Driver.java:613)
Предположим, кошки и собаки два различно интерфейсы
К сожалению, у нас есть два менеджера транзакций?
Домен связи в ответ мертв. – Pang