开发者

several Portlets making requests to DB

im new to this whole portlets my question came from the fact that our company is outsourcing this kind of development for another company. and they are facing this issue, which is there are too many requests going to the DB and many port开发者_JS百科lets on the same page make connection to the DB.

im thinking probably there is a better way , like for example having a controller over all of those portlets that will fetch data from DB for all related portlets, and then store them into session or something . or maybe one portlet (hidden maybe) that will make all the calls and store the values that it get from DB for each portlet into session variables.

they are using RAD, and WEbsphere Portal server. is that possible?

thanks


I believe it's a common problem. The best (in terms of reliability & simplicity) I could think of is caching the database access - using some standard java caching mechanisms: EHCache or DynaCache - if you want to stick to Websphere stack. Should be easy to implement, extra-easy if you use ORM like Hibernate.

Storing data in session sounds me like some sort of home-grown caching attempt and that usually doesn't end well. You will face concurrency issues at least.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜