Hi

I'm having a little trouble understanding sessions when using Elixir
inside of CherryPy (web server).

When I create/delete objects using session.save(obj) or
session.delete(obj) followed by session.flush() and then go back to a
"view" page, I'm "sometimes" seeing deleted objects still showing up
or newly created ones will be missing. I'm guessing this is some sort
of threading issue. (?)

I've tried fiddling with using session.begin(), session.commit(),
metadata.bind.autoflush=True/False, session.refresh/expire but I'm
quite confused.

I found this http://tools.cherrypy.org/wiki/Databases which I thought
might be relevant, but then
http://elixir.ematia.de/trac/wiki/TutorialDivingIn#a8.Moreonsessions
says that the session should already be thread-local.

So, should I be creating my own sessions inside of each web-request
handler? If so, how can I attach those to my Elixir objects? If not,
how do I make sure that the global elixir.session in all the threads
gets a consistent view of the database?

thanks,
scott

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SQLElixir" 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/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to