论坛首页 入门技术论坛

EJB3.0中事务的隔离级别是不是只能统一设置?(Jboss容器)

浏览 3280 次
该帖已经被评为新手帖
作者 正文
   发表时间:2007-01-29  
可不可以把部署的实体Bean中的某个设置成特殊的,比如总的是READCOMMIT的,而实体Bean A的事务隔离级别是REPEATABLE的。如果可以怎么设置?
   发表时间:2007-01-29  
可以为这个Bean写个Transaction,详情请查看ejb3.core里面的Controling Transaction ... -- local-Resource Transacrion.里面有个例子和你所说的很相似!

引用
bean-managed transaction demarcation

The Bean Provider can choose between using programmatic transaction demarcation in the enterprise bean code

With bean-managed transaction demarcation, the enterprise bean code demarcates transactions using the javax.transaction.UserTransaction interface. All resource manager accesses between the UserTransaction.begin and UserTransaction.commit calls are part of a transaction.


也就是说,你可以自己定义一个全局的事务,但是不要挂到JTA上就可以实现了!
0 请登录后投票
   发表时间:2007-01-29  
用CMP可不可以实现?
0 请登录后投票
   发表时间:2007-01-30  
3里面已经没有CMP了。。。


是POJO模型!帅哥!
0 请登录后投票
   发表时间:2007-01-30  
还不是一回事啊,如果容器不管理,别的东西也是要去管理EntityBean的,不管怎么样,可以设置的吧?
0 请登录后投票
论坛首页 入门技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics