Re: Re: DataContext problem?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Apr 18 2003 - 10:16:56 EDT

  • Next message: Jason Bedell: "logger and access"

    > Sounds good.
    > Yes, I'm using the DataContext in a session-lifetime.
    >
    > I tried to get the DataContext in every ActionClass by using:
    >
    > DataContext ctxt = ServletConfiguration.getDefaultContext(session);
    >
    > But nothing changed. The DataContext is still caching!
    >
    > Maybe it's a very dumb question but how can I use the DataContext in
    > such a short lifetimed way like you described?
    >
    > Thanks you
    >
    > Michael

    If you decide to go this way after reading my earlier email:
       http://objectstyle.org/cayenne/lists/cayenne-user/2003/04/0045.html

    Just replace

      DataContext ctxt = ServletConfiguration.getDefaultContext(session);

    With

      DataContext ctxt = DataContext.createDataContext();

    Andrus



    This archive was generated by hypermail 2.0.0 : Fri Apr 18 2003 - 10:16:57 EDT