标签: hibernate jpa jta hibernate-entitymanager
有一种方法可以让一个EntityManager在多个并发事务中顺畅地参与吗?
好吧,不是那个并发。类似的东西:
逐步跟随步骤不重叠。
答案 0 :(得分:1)
单独交易?不,它不能。
尝试在当前活动的事务上调用EntityTransaction.begin()(这是您必须直接或间接执行的操作)将导致IllegalStateException被抛出。
IllegalStateException
工作单元/交易范围概念在Hibernate EntityManager manual。