Je travaille sur un projet qui utilise Java, Spring et Hibernate. Je suis juste tombé sur une situation comme celle-ci.Problème avec la connexion SQL
haricot 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>
haricot 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>
mais lors de l'exécution d'une obtenant l'exception suivante
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)
Supposons chat et de chien sont deux interfaces differnt
ne pouvons-nous avoir deux gestionnaire de transactions ouvert ??
Le domaine du lien dans la réponse est mort. – Pang