Re: getThreadObjectContext

From: Marek Šab (msab..uk.cvut.cz)
Date: Fri Nov 19 2010 - 23:30:47 UTC

  • Next message: Andrus Adamchik: "Re: Search order for cayenne.xml"

    Hi,

    thanks, that was exactly what I wanted to hear.

    Regards,

    -- 
    Marek Šabo
    

    On 11/19/2010 11:09 PM, Michael Gentry wrote: > Hi Marek, > > I assume you are talking about using > BaseContex.getThreadObjectContext() along with the > WebApplicationContextFilter described here: > > http://cayenne.apache.org/doc30/web-applications.html > > The scope of those ObjectContexts are indeed session-based for the web > application. Each user gets a unique one, but the same ObjectContext > is re-attached each request/response cycle for the user, so > objects/etc in the ObjectContext stay around across requests. > > mrg > > > On Fri, Nov 19, 2010 at 2:52 PM, Marek Šabo<msab..uk.cvut.cz> wrote: >> Hi all, >> >> just wanted to ask you how scoped ObjectContext does method >> getThreadObjectContext() return? >> I mean javadoc says it's bound to current thread, and there is a new thread >> started during each request so is it "RequestScoped"? Or is it a global >> object that gets bound to the thread when new request arrives >> ("SessionScoped")? >> Friend of mine told me that he was only using this method for obtaining OC >> and that it remembered fk dependency issues between independent request so >> I'd go for "SessionScoped". >> >> Regards, >> >> -- >> Marek Šabo >> >> >>



    This archive was generated by hypermail 2.0.0 : Fri Nov 19 2010 - 23:31:31 UTC