To provide a bit more detail, NamespaceManager.set() mutates the
current ApiProxy environment, which is scoped to a single request and
is stored in a thread-local.
On Wed, Sep 15, 2010 at 4:54 PM, Guillaume Laforge wrote:
> Yeah, that would have been a design flaw, definitely :-)
> The fear I had
Yeah, that would have been a design flaw, definitely :-)
The fear I had was when seeing a static methods being used. I'm always
afraid when I see 'static' somewhere.
For Gaelyk (http://gaelyk.appspot.com/tutorial#namespace), I've added a
method to "wrap" the usage of a namespace under a certain sc
Yes, it should be thread local. That'd be a pretty bad design flaw if it
wasn't! The reason you may have thought it wasn't is because the Python
implementation isn't - but that's a non issue since Python app servers are
single threaded in production.
On Wed, Sep 15, 2010 at 9:24 PM, Guillaume Lafo
Out of curiosity, the namespace info is stored in a thread-local?
So I can have two concurrent requests (from, say, two different customers)
using a different namespace?
The fact of doing NamespaceManager.set() with a static method is quite
frightening as it could be thought of as being done globa
Why not just do this with a servlet filter? It's very cheap to do and isnt't
computationally expensive - it's not like you're reestablishing an expensive
connection or anything.
On Wed, Sep 15, 2010 at 12:08 PM, Vikas Hazrati wrote:
> We are building a multi-tenant application and want to use th
We are building a multi-tenant application and want to use the
NamespaceManager to distinguish between tenants on the basis of server-
name. So for example inphina.bookmyhours.com would be a different
tenant than te-con.bookmyhours.com
we are currently using NamespaceFilter with code similar to
i