请问彭老师

04-03-22 jiangjing
              

您好,我是J2EE新手,问个小问题希望得到您的回答.

问题:在EJB中可以为每个方法设定事务类型,那么是否可以这样认为:一旦方法被设为REQUIRED类型的事务,那么这个方法可以认为被synchronized了,也就是说REQUIRED类型的事务包括synchronized?谢谢!

              

jiangjing
2004-03-22 10:43

见到了也不回,好伤心呀!自己顶

jiangjing
2004-03-22 11:34

c) If a client in transaction context A calls an entity object (the

logical object as seen by him), then the container delegates the call

to an entity bean instance (say, EJB-A). Until the transaction

commits, this instance is only(!) accessible wihtin the transaction

context A.

This means, that another client and/or another transaction context

calling this entity object will not(!) be delegated to EJB-A, but to

another entity bean instance EJB-B. EJB-A and EJB-B represent the same

logical entity object and both can be understood as being in-memory

copies (caches) of the same database

这段话的意思是不是说:一条数据库记录在内存中可能有两个缓寸数据?请指教,谢谢!

banq
2004-03-22 12:29

在我的J2EE实战教材中,我指出了支持实体bean底层实际是Cache+Pool的机制。

一个数据库记录在内存有Cache和pool,因此随着并发访问量可能有很多个。

4Go 1 2 3 4 下一页