Hi Everyone,
I am playing around stateful session beans. So building a shopping cart simple demo for that. I am new to EJBs. So need to clear a doubt. We know Stateful session beans are used for more than one conversation between client and server. Here client is a
Servlet. So when user first time enters or adds an item to cart, i fire a create(some arg, may be user name) and get a ref to remote component stub. Now item is added first time. and my first request to web client is done. The item is finally added in Session bean 's list.
We know that http is stateless. Next time, i cant get ref to remote component stub to the same bean. So do i need to store it into HttpSession for the same user session till the time user say confirm for all items and when user confirm, finally after buying those items, i need to call remove on ref to remote component stub or on home stub with Handle.
Please correct me if i am wrong here or tell me some good technique of this.
Thanks
Pawan
SCJP5.0, SCWCD 1.4
TARGET: EJB2.0 and the EJB3.0