Well, you can use a servlet session to store any simple JavaBean
that encapsulates the ProductIds of the user's shopping cart without
using stateful session bean. You could even just keep every item in the
cart directly in the servlet session as name value pairs if you want
simple.
Laird Wrote:
Oliver Enseling wrote:
> A good example for a stateful session bean is a shopping cart, IMHO.
I've always wondered about this example. This means that for every
concurrent user on your website, you have to have a stateful session
bean active and keeping state. If you have a really good day--say
you're Amazon--then that's a lot of thrashing your appserver will get
into, right? Is this really the way to write a scalable application?
That said, on the other hand, the other choices don't look very good
either. You can do a stateless session bean in which case you're
basically writing JDBC all day long, or you can do an entity bean, which
probably doesn't scale well either.
Does anyone have any comments on this?
Cheers,
Laird
--
tcp
Thomas Preston
Vacation.com, Inc.
Engineering Department
617.210.4855 x 124
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".