Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

pattern "value list Handler" to develop a forum

843830Apr 28 2009 — edited Apr 28 2009
Hi,
I develop an application with servelt, JSP, EJB+JBOSS and I want to develop a forum in java.

I found an interesting pattern : "Value List Handler" (http://java.sun.com/blueprints/corej...stHandler.html ) that allow me to recover all the topics of a forum a first time and to send back according to the request only the 30 first results of the first page or the 30 results of the page n. The advantage is that the recovering of the list at the beginning is done once and it is stored in memory. Then, we run through the list and we send back a sub list.

To store the list in memory, I think about using a stateful session bean that store in memory the list for a given session. But when I will have 1000 clients, that is 1000 sessions, that is 1000 list stored in memory what will happen ? The performances are going to be catastrophic because the stateful session bean uses a lot of ressources.

The best would be to have a bean with an application scope and that I refresh the list only when one access the first page. But I don't know how I can implement that. On the other hand it may have ghost readings betwen 2 different clients. Using the EJB technology, must I use EJB or may I use a special bean with a caching with a scope application ?

Any help will be appreciated.
.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 26 2009
Added on Apr 28 2009
1 comment
107 views