I am currently working on a project where I would like to give only one person at a time the ability to save a record. For instance if 2 people go to a page that can save the same data I would like to Lock out one of the 2. I can think of many ways to actually lock. My problem is how do I unlock if the person that locked the file just clicks the X on the browser window? Thanks in advance. ------------------------------------------------------------------------------- Ron Baum Database Engineer Accelerated Technology, Inc. 720 Oak Circle Dr East Mobile, AL 36609 Email: rbaum@atinucleus.com http://www.acceleratedtechnology.com ------------------------------------------------------------------------------- "Nucleus. All You NEED in an RTOS. Royalty Free." -------------------------------------------------------------------------------
Ron Baum wrote:
I am currently working on a project where I would like to give only one person at a time the ability to save a record. For instance if 2 people go to a page that can save the same data I would like to Lock out one of the 2. I can think of many ways to actually lock. My problem is how do I unlock if the person that locked the file just clicks the X on the browser window?
Ron, I have struggled with this issue for some time now and the 'best' (albeit, not ideal) solution I have come up with is to create &/or enter a Version as the webform is loaded, call your manage_changeProperties() so you have written to the object and lock out other users then make the changes in the webform manage_changeProperties() again then save the Version. This is really ugly for an old RDBMS guy, but 'I think' it works. If anyone sees a problem feel free to jump in. I tried working with the transaction and locking machinery but it made my head hurt too much. ;-) -- Tim Cook, President - FreePM,Inc. http://www.FreePM.com Office: (901) 884-4126 ONLINE DEMO: http://www.freepm.org:8080/FreePM
With difficulty web sites being stateless. Perhaps WebDav is what you are looking for? -- Andy McKay. ----- Original Message ----- From: "Ron Baum" <rbaum@atinucleus.com> To: "Zope List" <zope@zope.org> Cc: "Yvonne Totty" <ytotty@atinucleus.com>; "Steven Grimes" <sgrimes@atinucleus.com> Sent: Wednesday, April 04, 2001 9:22 AM Subject: [Zope] Locking
I am currently working on a project where I would like to give only one person at a time the ability to save a record. For instance if 2 people go to a page that can save the same data I would like to Lock out one of the 2. I can think of many ways to actually lock. My problem is how do I unlock if the person that locked the file just clicks the X on the browser window?
Thanks in advance. --------------------------------------------------------------------------
Ron Baum Database Engineer Accelerated Technology, Inc. 720 Oak Circle Dr East Mobile, AL 36609
Email: rbaum@atinucleus.com http://www.acceleratedtechnology.com --------------------------------------------------------------------------
"Nucleus. All You NEED in an RTOS. Royalty Free." --------------------------------------------------------------------------
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Ron Baum wrote:
I am currently working on a project where I would like to give only one person at a time the ability to save a record. For instance if 2 people go to a page that can save the same data I would like to Lock out one of the 2. I can think of many ways to actually lock. My problem is how do I unlock if the person that locked the file just clicks the X on the browser window?
Thanks in advance.
You should lock the resource only when the user really writes to it where is the problem? azazel
participants (4)
-
Andy McKay -
aZaZel -
Ron Baum -
Tim Cook