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/d
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
;-)
many thanks it works well now.
Arnaud
2009/9/14 Andrey Razumovsky :
> Now you're creating new HashMap every request, and, as in your first
> example, old bindings get erased. Bind method should be rewritten as
>
> public static void bindThreadObjectContext(ObjectContext context,
> String doma
Now you're creating new HashMap every request, and, as in your first
example, old bindings get erased. Bind method should be rewritten as
public static void bindThreadObjectContext(ObjectContext context,
String domain) {
Map objectContextMap =
threadObjectContext.get();
if (objectCo
Well, I think there is something I don't understand, I change again
and, no change..
now I build a new hash, 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 =
Now objectContextMap is static, so only one context is allowed per domain
name (for entire app). Map should be created on the fly if needed, in bind()
2009/9/14 Arnaud Garcia
> OK, so I just change by adding new ObjectContext to a Map and set/get
> this Map from the ThreadLocal which is only as
OK, so I just change by adding new ObjectContext to a Map and set/get
this Map from the ThreadLocal which is only as the map created one
time...
But, I still have the same error sometimes
below the new code if you can have a quick look...
many thanks, for help !
arnaud
--
Well, looking at your code, I think you should not create new ThreadLocal
each time request is received (in bindThreadObjectContext). You old bindings
just get erased
2009/9/11 Arnaud Garcia
> Hello,
>
> I created a filter to use multi domains in a webapp, but I still have
> a problem, I don