Hi there, Ok, I hit one snag and need someones opinion.
Identity/visit stuff (identity.saprovider and visit.savisit) is called before run_with_transaction is called. run_with_transaction starts by clearing the default SA session. This means that any changes or new objects made by the identity/visit code do not get saved. I have two ways out of this: 1. Just don't clear the default session at the start of run_with_transaction. There is something about this that makes me uneasy, but I don't know what. 2. Make the saprovider and savisit use explicit sessions for their modifications of persistent objects and flush those sessions immediately. This is in tune with the 0.1 version. However, since the user instance in identity.current.user is loaded at in this code, it is either bound to one of those explicit sessions or cleared out of the default session by run_with_transaction. Either way, the result is that identity.current.user is not bound to any session in the controller. If the user does something like: identity.current.user.lastseen = datetime.now() this does _not_ get saved to the db. Now, 1. or 2. ? Maybe there's nothing wrong with solution 1., the session is closed (and thereby cleared) in the "finally" clause in run_with_transaction. Does CP create a new thread for each request or is it reusing threads from a thread-pool like Apache? Arnar --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears -~----------~----~----~----~------~----~------~--~---

