Hi. I have a question about how a client application knows which instance of a stateful bean belongs to it. Let's assume we have a bean called ShoppingCart. When a client connects to the application, it gets a shopping cart it can add things to. There are two cases I have questions about.
Case 1: Assume we have a thick
java client (i.e. written in Swing for example). If multiple methods in that client need to lookup the shopping cart bean (and they don't pass the bean between them), will multiple methods know to lookup the same version of the bean? Or do I need to pass around some session identifier?
Case 2: Assume we have a browser client. And in my web application, there is a Java
servlet that serves as a facade for looking up the
EJB. In this case, do I need to pass the browser session ID to get the correct bean? Or will the servlet know that it was the same browser making a request and get the correct bean?
Thanks,
Jeff