Michael Bayer wrote:
> sure, the threadlocal mod and the activemapper mod both make their own 
> SessionContext, both of which get associated with the mapper for Foo,  
> and then they are conflicting.  they are currently not compatible.

Clarification appreciated.

> while I could improve the behavior of MapperExtension so that the 
> SessionContext set up by ActiveMapper takes precedence over the more 
> global one set up by threadlocal, that doesnt answer the question why 
> you are using both modules at the same time.  are you going to mix 
> ActiveMapper classes with non-activemapper classes, and want a single 
> objectstore.flush() to save them all ?

It was actually quite by mistake, and I've since turned off threadlocal 
-- but being able to detect and throw an exception highlighting the 
incompatibility would be a Good Thing if it's going to be an ongoing issue.

> if we would like to say that, if one uses the ActiveMapper extension, 
> then that automatically loads the "threadlocal" mod in all cases, we can 
> go with that, although im not terribly comfortable with making that 
> assumption.

Agree -- it doesn't sound like a really great idea to me either.

> a more complex approach would involve the ActiveMapper extension 
> detecting if the threadlocal mod is already installed, and if so it 
> would swap out its own "objectstore" object for the one used by the 
> threadlocal mod.  below is a patch that does this, which forces me to 
> change the threadlocal mod to match the changes you made to 
> ActiveMapper's objectstore.  
> 
> Is there a test condition you can send me that illustrates why it was 
> necessary to have Objectstore no longer subclass SessionContext ?

Hrm. I'll need to go back and look into it some -- when dmiller's 
approach made the issue I was having go away, I pretty much stopped 
looking into *why* that issue was happening.



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to