Hi Kapil Thangavelu!
I dont  know of if this is what your after, but here is one way do do
transacts with / without rollback


One simple way of having rollback is to do it with except raising a
flag, then 
if the flag gets turned on do whatever is needed to undo the current
action
this can be done recursivly, to rollback a whole sequence of actions

rollback=0
try:
  [do stuff foo]
  try:
    [do stuff bar]
  except:
    rollback=1
  if rollback:
    [rollback bar]
except:
  rollback=1
if rollback:
  [rollback foo]   




> hmmm... related question (i think) how does one make a method whose
> effect can't be rolled back?

try:
  [do stuff foo]
   
  [do stuff bar]
except:
  pass


        /Jacob Lundqvist

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
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 )

Reply via email to