> > > My current thinking is that objects from the model package are indeed > destined to be cached in the session and application scopes, but only > as generic Object references (Beans). i.e.: > > - User submits login form. > - Login Action gets called, marshals username, password to login() > function of business logic. > - Business logic consults database (with Connection from DataSource > cached in 'registry') > - (If password is correct), login() returns new UserBean Object > - Login Action installs UserBean Object in session scope, then > forwards to next page > - JSP components read whatever user-displayable junk they need from > stored UserBean. > > Is this not an acceptable way to do it? IIUC You seemed to react with > alarm to the notion ("surely you don't have any model components > hanging around in sessions or application scope?"). Hence my > explanation.
I don't think a bean with user data is a model bean - it's a data bean or data transfer bean or at least the acronym is DTO. state beans, that's EJB-speak isn't it? Not sure whether it means the same thing. VO for value object - that might also be the same thing but I'm not sure. What you outline above would be what I'd do >> From general discussion on this list your assumption about the >> 'right way' would be correct - pass all you need into the model >> components as parameters. > > > By subclassing ActionServlet to properly initialize the back end, then > using that ActionServlet rather than the 'stock' one? I mean by passing it to the model object when you instantiate it in your Action perform(). I haven't done it your way using a Registry Regards Adam -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>