Hmm... I'm not sure why it's done this way in the AuthenticatedWebSession but nevertheless it's the only task of a session object to keep informations between two requests. From this point of view a authenticate(String,String) doesnt' really make sense in the Class. May be there is someone here who can explain this point. I wouldn't say that this is wrong, but unusual... :)
May be you can get the database connection from inside the method for authentication purposes, Then you haven't got any private or public members which should be serialized and contains a database connection. m. Jan Torben Heuer schrieb: > Marc Ende wrote: > > >> webapps do. In this case you've got to serialize the connection. I don't >> think that's easy/possible to seralize a database connection. >> I would go another approach which uses the session only as a >> information-container and get those needed information from the >> database in the page-lifecycle. That keeps the session-object small >> (which is also an aspect). >> > > Hmm, following your argumentation, would you say that the > AuthenticatedWebSession is implemented wrong because it contains a > #authenticate method (which clearly needs a reference to some kind of > database)? > > Or would marking the field as "transient" be fine? > > > Cheers, > > Jan > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
