Re: Question about DataContext

From: Joshua Pyle (
Date: Tue May 10 2005 - 14:13:22 EDT

  • Next message: Cris Daniluk: "Re: Question about DataContext"

    I believe that is exactly what is being done :-)
     My understanding is that if the session attribute does not exist this call
    will put it there.
     Joshua T. Pyle

     On 5/10/05, Fredrik Liden <> wrote:
    > I'm just curious,
    > Is there any preference over calling the following line for every
    > request to various JSPs and Servlets compared to just calling it once
    > during login and then take that context and store it as a session
    > attribute?
    > DataContext context =
    > BasicServletConfiguration.getDefaultContext(request.getSession());
    > The reason I ask is that sometimes I need to clear out the context and
    > all the objects (say if a change was made to the underlying db). I'm
    > thinking the logout which invalidates the session would be a good place
    > for that. Or during the logout, should I just release all the objects in
    > the dataContext (if that's possible) ?
    > Fredrik

    Joshua T. Pyle
    Go has always existed.

    This archive was generated by hypermail 2.0.0 : Tue May 10 2005 - 14:13:24 EDT