Basically, no.

You could recode DA's to close the connection at the end of every transaction and reopen them on demand, but to the best of my knowledge none of the DAs work that way.

Once a connection object opens its connection it stays open but in the object cache of that thread. This gives it both an indeterminate lifespan and a fair amount of isolation from other threads -- sadly, the thread that you're running your ZMI transaction on. The ZMI cant "see" what objects the other threads are using (well you actually CAN program that but -- dont! -- you'd most likely break Zope in a severe way without intending to)

Most of the open buttons on database connections are pretty useless -- they just make the connection open early. Most DA's open a connection on demand. For "Most" read "all" because I don't know of one that DOESNT work that way.

On Jul 13, 2006, at 4:41 AM, Jose Carlos Balderas Alberico wrote:

Greetings. I'm having a problem with database connectors, and maybe you can give me a hand.

Is there a way to manage the opening and closing of database connectors, apart from doing it from the zope management interface? By this I mean, I want to implement a Python script that checks wether a database connection is open or closed. If it's closed, I'll open it, all coded, without having to click the "Open connection" button.

I haven't found info on this. Can you help me out with this?
Thank you very much in advance.
Zope-DB mailing list

Zope-DB mailing list

Reply via email to