Hi,
Assume i login into a Shopping Cart appl and add an item to my cart.
In the code when home.create(
String userId) would be called, the SFSB bean and the EJBObject would be created. (For SFSB, the create() can take args !!!). The ejbCreate(String userId) in the bean would be called. It might have some code like - this.userId = userId. This associates the bean with the user, right ???
My item would be added to an arraylist in the bean class.
When I add another item to my cart, then would the home.create(String userId)be called again ? Then it would check for the userId attribute in the existing Bean classes, and find out that the bean is already created, and use the existing bean.
Is this how it works ???
Or, is it sth like, when the user logs in (or at some later point of time), a SFSB is associated for him. And we use that bean for all the items that he adds to the cart.
Please clarify.