Pet Store Model Manager Question
One thing escapes me in the Pet Store application:
The ModelManager object contains the HttpSession
variable,
public class ModelManager extends ModelUpdateNotifier implements java.io.Serializable {
private ServletContext context;
private HttpSession session;
private ShoppingClientController sccEjb = null;
....
}
and retrieves some data from session, e.g.
public CustomerWebImpl getCustomerWebImpl() {
CustomerWebImpl customer = (CustomerWebImpl)
session.getAttribute(WebKeys.CustomerWebImplKey);
if (customer == null) {
customer = new CustomerWebImpl(this);
session.setAttribute(WebKeys.CustomerWebImplKey, customer);
}
return customer;
}
But then how is ModelManager stored in the session
variable itself?
ModelManager modelManager = (ModelManager)
session.getAttribute(WebKeys.ModelManagerKey);
Isn't this recursive? Can someone please shed some
light on this? Thanks.

