Atomikos Forum

manual tx demarcation with userTransaction in Spring/JPA ?

Hi,

is it possible to open and close TXs manually with the configured ( Atomikos ) UserTransaction implementation?

It seems to me that the Spring/JPA logic gets screwed...

I am struggling with code that throws

org.hibernate.HibernateException: Illegal attempt to associate a collection with two open sessions

Looks like this is due to the fact that queries always create a new entitymanger and close it after returning...

Thanks
Andreas Ernst Send private email
Wednesday, October 23, 2013
 
 
after debugging the code i will anwser my own question:-)

The answer is no. Spring has its own internal mechanisms (PlatformTransactionManager) that you are forced to call.

Spring sucks badly!
Andreas Ernst Send private email
Wednesday, October 23, 2013
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics