aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Doubt in Stateful Session Beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Doubt in Stateful Session Beans" Watch "Doubt in Stateful Session Beans" New topic
Author

Doubt in Stateful Session Beans

Sai Surya
Ranch Hand

Joined: Feb 08, 2006
Posts: 459

Hi,

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.
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

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


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt in Stateful Session Beans