Hi, does it work with JPA?I found this to be quite problematic also. It took me some time to figure out what was going wrong.
In the end I settled on this solution for the ChainedTransactionManager
I've tried ChainedTransactionManager with org.springframework.orm.hibernate3.HibernateTransa ctionManager but it works only with "read" operations. Any attempt to write something to DB produces an error
My configurationCode:[org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is java.lang.IllegalStateException: Already value [org.springframework.orm.hibernate3.SessionHolder@13122a1] for key [org.hibernate.impl.SessionFactoryImpl@580334] bound to thread [btpool0-3]]
Thanks in advanceCode:<bean id="hbTransactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="prodSessionFactory" /> </bean> <bean id="chainedTM" class="org.springframework.data.neo4j.transaction.ChainedTransactionManager"> <constructor-arg> <list> <ref bean="hbTransactionManager" /> <ref bean="jcrTransactionManager" /> <ref bean="xaTransactionManager" /> </list> </constructor-arg> </bean>
Alexander



Reply With Quote
