I am implementing a stateful session bean for my shopping cart application. My requirement is to persist the data across many sessions. I mean, for each user login, the user should be able to see other user's cart items. Is it possible with stateful session beans? Or do I need to implement this without stateful session beans? Which approach is faster?
Thanks in advance,
Sai Surya, SCJP 5.0, SCWCD 5.0, IBM 833 834
http://sai-surya-talk.blogspot.com, I believe in Murphy's law.
Why would a user want to see other user's cart items ? Your implementation depends on the requirement. If you would like any customer to lookup any other cart item, then an entity bean might work well with CMP for a user cart table. You could use finder methods to get the cart items you want based on a customer ID