Java设置事务隔离,java – 如何在EJB中设置事务隔离?

我无法找到在ejb中设置TransactionIsolation的方法.任何人都可以告诉我如何设置它?我正在使用持久性.

我查看了以下课程:

EntityManager,EntityManagerFactory,UserTransaction.他们似乎都没有像setTransactionIsolation这样的方法.我们需要更改persistence.xml吗?

我刚看了一本名为Mastering EJB 3.0 4th edition的书.他们给出了关于隔离级别的完整的10页理论,这个问题发生了,并且发生了这样的事情,但最后他们给出了这一段: –

"As we now know, the EJB standard does not deal with isolation levels directly,

and rightly so. EJB is a component specification. It defines the behavior and

contracts of a business component with clients and middleware infrastructure

(containers) such that the component can be rendered as various middleware

services properly. EJBs therefore are transactional components that interact

with resource managers, such as the JDBC resource manager or JMS resource

manager, via JTS, as part of a transaction. They are not, hence, resource

components in themselves. Since isolation levels are very specific to the

behavior and capabilities of the underlying resources, they should therefore be

specified at the resource API levels. "

究竟是什么意思?资源级API的含义是什么?请帮我.如果持久性无法设置隔离级别,那么为什么他们会在EJB书中提供如此巨大的理论并使其在重量上不必要地重:(

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值