sorry for those on both the pylons/sqlalchemy lists. not sure what the
best place for this is:

I'm seeing some interesting behavior with threadlocal sqlalchemy/
pylons.
after a session.commit() the next connection used is different from
the original despite the fact that the it's on the same thread/
request. isn't threadlocal was supposed to prevent this? here is a
code sample I'm running: http://pastebin.com/m40d94ca7. for some
reason, the connection id's returned are different. if this is the
expected behavior, is there any straight forward way to keep the same
connection or reacquire it?
for those wondering why I need this: I'm using the mysql GET_LOCK()
method to create application level locks that span multiple servers
and the lock must be released by the same connection that acquired
it.
I also need to release the lock /after/ the transaction is committed
(or rolled back) which is why I can't simply release the lock within
the initial transaction.
any help would be greatly appreciated. thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to