Hibernate,spring,JPS&隔离 - 不支持自定义隔离 [英] Hibernate, spring, JPS & isolation - custom isolation not supported

查看:492
本文介绍了Hibernate,spring,JPS&隔离 - 不支持自定义隔离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试:

  @Transactional(isolation = Isolation.SERIALIZABLE,
rollbackFor = {Exception .class},
propagation = Propagation.REQUIRES_NEW)

抱怨说:

 标准JPA不支持自定义隔离级别 - 使用特殊的JpaDialect 



如何解决这个问题?

解决方案

这个实现不是清理的东西,我实现了一个类似的解决方案,但是说明了清理以及。
该解决方案可以在这里找到:
http://shahzad-mughal.blogspot.com/2012/04/spring-jpa-hibernate-support-for-custom.html


I have been trying this:

@Transactional(isolation=Isolation.SERIALIZABLE, 
               rollbackFor={Exception.class}, 
               propagation=Propagation.REQUIRES_NEW)

on my service methods, but spring complains saying:

Standard JPA does not support custom isolation levels - use a special JpaDialect

How can I resolve this?

解决方案

This implementation is not account for the clean up stuff, I have implemented a similar solution but that accounts for the clean up as well. That solution can be found here: http://shahzad-mughal.blogspot.com/2012/04/spring-jpa-hibernate-support-for-custom.html

这篇关于Hibernate,spring,JPS&隔离 - 不支持自定义隔离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆