On Jun 27, 2006, at 12:57 PM, Randall Smith wrote: > This makes sure each thread makes a connection. Again, this is > probably > more fit for the TG group, but it was the understanding of threadlocal > and metadata connections that I have been grasping for and finally > got. > Particularly that in a threadlocal context, engines are bound to > metadata, not sessions. Do I understand that correctly?
randall - as it turns out, you can do it both ways; people have had needs in both directions. table metadata bound directly to engine: meta = DynamicMetaData() table =Table("sometable', meta, ...) meta.connect(someengine) create session as follows: sess = create_session() ---------------------------------------------------------------- table metadata not bound to an engine: meta = MetaData() table =Table("sometable", meta, ...) create session as follows: sess = create_session(bind_to=someengine) when using the session, the engine which the Session is bound to takes precedence over the engine that the Table is bound to via its MetaData (there is also a way to even customize that....but lets grasp this concept first! ) 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 Sqlalchemy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users