Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Design Pattern & UML  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 关于 Fast-Lane Reader 模式
jameszhang



CJSDN高级会员


发贴: 1594
积分: 111
于 2004-10-23 10:39 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
最进又看 刘兵(bliu76@yeah.net)<PetStore 中EJB 的设计模式> 对于Fast-Lane Reader 模式,不解,拿出来跟大家讨论一下:

原文
Fast-Lane Reader 模式:Accelerate read-only data access by not using enterprise beans.

但是如果用 ENTITY BEAN 来负责一些只读的 应该不会慢,不解?


jameszhang edited on 2004-10-27 13:40

"First they ignore u, then they laugh at u, then they fight u, then u will win

Mahatma Gandhi"

作者 Re:关于 Fast-Lane Reader 模式 [Re:jameszhang]
tongang





发贴: 8
积分: 0
于 2004-10-26 23:59 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
ENTITY BEAN,查询大量的数据就会变慢的。

Fast-Lane Reader 模式根据DAO直接读取数据库。然后通过缓存。。用SESSION BEAN的方式发布。速度就快很多了。。

他是指大数据查询的时候使用的。技术。。



作者 Re:关于 Fast-Lane Reader 模式 [Re:jameszhang]
tongang





发贴: 8
积分: 0
于 2004-10-26 23:59 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
ENTITY BEAN,查询大量的数据就会变慢的。

Fast-Lane Reader 模式根据DAO直接读取数据库。然后通过缓存。。用SESSION BEAN的方式发布。速度就快很多了。。

他是指大数据查询的时候使用的。



作者 Re:关于 Fast-Lane Reader 模式 [Re:jameszhang]
jameszhang



CJSDN高级会员


发贴: 1594
积分: 111
于 2004-10-27 11:10 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
看文中意思,好象不是!?我有只读数据用实体BEAN 是否快呢?


"First they ignore u, then they laugh at u, then they fight u, then u will win

Mahatma Gandhi"

作者 Re:关于 Fast-Lane Reader 模式 [Re:jameszhang]
emarket

亢龙有诲

CJSDN高级会员


发贴: 460
积分: 82
于 2004-10-27 13:09 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Core J2EE Pattern 2nd p56里面有所提及,CMP 被 force CMT, 而 Transaction 对 read only data 简直就是浪费,Using an entity bean as a read-only object simply wastes expensive resources and result in unnecessary update transactions to persistent store. this is due to the invocation of ejbStore() methods by the container during teh entity bean's life cycle. Since the container has no way of knowing if the data was changed during a method invocation, it must assume that it has and invoke the ejbStore. Thus, the container make no distinction between read-only and read-write entity beans.
虽然某些container 提供 read-only entity beans, 当时J2EE spec 没有定义,所以这些属于私有实现。
jameszhang wrote:
最进又看 刘兵(bliu76@yeah.net)<PetStore 中EJB 的设计模式> 对于Fast-Lane Reader 模式,不解,那出来跟大家讨论一下:

原文
Fast-Lane Reader 模式:Accelerate read-only data access by not using enterprise beans.

但是如果用 ENTITY BEAN 来负责一些只读的 应该不会慢,不解?



个人Blog http://agilespeaking.blogspot.com/

作者 Re:关于 Fast-Lane Reader 模式 [Re:tongang]
emarket

亢龙有诲

CJSDN高级会员


发贴: 460
积分: 82
于 2004-10-27 13:11 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
好像不是这样的吧,entity bean也可以缓存的哦。真正的原因不是大量,而是transactionSmile

tongang wrote:
ENTITY BEAN,查询大量的数据就会变慢的。

Fast-Lane Reader 模式根据DAO直接读取数据库。然后通过缓存。。用SESSION BEAN的方式发布。速度就快很多了。。

他是指大数据查询的时候使用的。技术。。



个人Blog http://agilespeaking.blogspot.com/

作者 Re:关于 Fast-Lane Reader 模式 [Re:jameszhang]
jameszhang



CJSDN高级会员


发贴: 1594
积分: 111
于 2004-10-27 13:39 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我在应用中,就是使用read-only ejbLoad 一次数据,然后疯狂调用,效果不错,页面流畅,在800用户同时在线的情况下响应时间平均只有几秒中(服务器512MB,WLS只用了 256MB)

jameszhang edited on 2004-10-27 13:41

"First they ignore u, then they laugh at u, then they fight u, then u will win

Mahatma Gandhi"

作者 Re:关于 Fast-Lane Reader 模式 [Re:jameszhang]
emarket

亢龙有诲

CJSDN高级会员


发贴: 460
积分: 82
于 2004-10-31 12:41 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
jameszhang wrote:
我在应用中,就是使用read-only ejbLoad 一次数据,然后疯狂调用,效果不错,页面流畅,在800用户同时在线的情况下响应时间平均只有几秒中(服务器512MB,WLS只用了 256MB)

如果你的read only entity bean(不要用container私有的办法设置entity bean为 read only)参与了transaction , 好像不会只调用一次 ejbLoad吧。 另外 ejbStore 也会被调用的哦。



个人Blog http://agilespeaking.blogspot.com/


flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923