Re: getThreadObjectContext

2010-11-19 Thread Marek Šabo
On Fri, Nov 19, 2010 at 2:52 PM, Marek Šabo 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&qu

Re: getThreadObjectContext

2010-11-19 Thread Michael Gentry
es 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 > ("Se

getThreadObjectContext

2010-11-19 Thread Marek Šabo
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

Re: getThreadObjectContext with domain parameter - code -

2009-09-15 Thread Arnaud Garcia
sh, that I put on the ThreadLocal >> >> I am sorry but I don't understand why... >> Arnaud >> >> code below >> >> >> public class ImagemedBaseContext { >> >>    protected static final ThreadLocal> >> threadObjectContext

Re: getThreadObjectContext with domain parameter - code -

2009-09-14 Thread Andrey Razumovsky
seContext { > >protected static final ThreadLocal> > threadObjectContext = new ThreadLocal>(); > >public static ObjectContext getThreadObjectContext(String domain) > throws IllegalStateException { > ... > public static void bindThreadObjectContext(ObjectContext context, &g

Re: getThreadObjectContext with domain parameter - code -

2009-09-14 Thread Arnaud Garcia
ObjectContext = new ThreadLocal>(); public static ObjectContext getThreadObjectContext(String domain) throws IllegalStateException { ... public static void bindThreadObjectContext(ObjectContext context, String domain) { Map objectContextMap = Collections.synchronize

Re: getThreadObjectContext with domain parameter - code -

2009-09-14 Thread Andrey Razumovsky
threadObjectContext = new ThreadLocal>(); > >public static ObjectContext getThreadObjectContext(String domain) > throws IllegalStateException { > ObjectContext context = threadObjectContext.get().get(domain); > if (context == null) { >throw new Ill

Re: getThreadObjectContext with domain parameter - code -

2009-09-14 Thread Arnaud Garcia
static final ThreadLocal> threadObjectContext = new ThreadLocal>(); public static ObjectContext getThreadObjectContext(String domain) throws IllegalStateException { ObjectContext context = threadObjectContext.get().get(domain); if (context == null) { thr

Re: getThreadObjectContext with domain parameter - code -

2009-09-11 Thread Andrey Razumovsky
in.getName()); >} >} > } > > -- ImagemedBaseContext ---- > package com.imagemed.cayenne; > > import java.util.Collections; > import java.util.HashMap; > import java.util.Map; > import java.util.logging.

getThreadObjectContext with domain parameter - code -

2009-09-11 Thread Arnaud Garcia
tLogger(ImagemedBaseContext.class.getName()); public static ObjectContext getThreadObjectContext(String domain) throws IllegalStateException { ThreadLocal threadObjectContext = threadLocalMap.get(domain); ObjectContext context = threadObjectContext.get(); if (context == nu