Forums Register Login

Design decision? Only for real Architects...

+Pie Number of slices to send: Send
Hello everyone,
I was wondering what the best solution would be to hold Session information in a J2EE application.
If I develop an application using JSP, Servlet and EJB technology where should I hold all the session information.
In a previous project we chose to hold everyting on the EJB side. Keep the HttpSession as empty as possible. We had one Stateful session bean that holds all session info.
We did this because some Java Architect told me that an EJB container can be scaled better opposed to the Web-container.
But I read somewhere that Stateful session beans don't scale so well.
So what is the best decision? Keep everything in the HttpSession or keep everything in a Stateful session bean? Or is there an even better solution.
What is best for a really big application?
Greetings Manuel
+Pie Number of slices to send: Send
put it in the HttpSession. Some containers (websphere) don't failover Stateful session beans.
+Pie Number of slices to send: Send
BLUEPRINT RECOMANDATION:
http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/web-tier/web-tier5.html#1080752
4.4.7.3 Web-Tier State Recommendations
When using enterprise beans, it's best to maintain session state with stateful session beans in the EJB tier. For Web-only applications, maintain the state in the Web tier as session attributes (using HttpSession). The following sections discuss the rationale for these recommendations. [...]
Maintaining session state in stateful session beans is a BluePrints best practice. [...]
MfG Rudi
+Pie Number of slices to send: Send
This is what google found for me:
http://www.onjava.com/pub/a/onjava/2001/10/02/ejb.html?page=last&x-showcontent=text
It's worth finding out if your appserver supports stateful session bean failover & how it's implemented.
+Pie Number of slices to send: Send
This depends: if your application using enterprise beans, better store your session states in EJB tier using stateful session bean. If your application does not using the EJB, maintain the state in web tier(using HTTPSession) is a wise choice.
Check this:
http://java.sun.com/blueprints/patterns/SessionFacade.html
[ May 21, 2003: Message edited by: Frank Zheng ]
[ May 21, 2003: Message edited by: Frank Zheng ]
+Pie Number of slices to send: Send
Alternatively you can use the database to store the session information using the session id as the key.
Message for you sir! I think it is a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 716 times.
Similar Threads
Storing Conversational information in J2EE project
Shopping cart strategy for part 2. JSF with session scope or Stateful Session Beans?
Session state management
Shopping Cart as Stateful Bean
store state info in session or stateful bean?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:05:23.