[Zope] Python and EJB (J2EE)

Ender kthangavelu@earthlink.net
Sun, 26 Nov 2000 15:00:54 -0800


Nitin Borwankar wrote:
> 
> 
> > I've mentioned two-phase commit to Digicool people. Not sure whether it's
> > already inside Zope or not, but it seems not. Zope's TM (Transaction
> > Machinery) does not seem to be two-phase. See the TM.py file itself: it only
> > has
> >
> >     def _finish(self):
> >         self.db.commit()
> >
> > That is, I don't see the equivalent of prepare_to_commit().
> 
> I'm not sure Zope source is the place to look for this,
> perhaps ZEO source may be more appropriate.
> 
> Nitin.


this has been enlightening, i'm still coming up to speed on all the ejb
stuff.

zope does implement a two-phase commit and it is integrated with the
transaction machinery. to see a good mix in that shows more of the
transaction methods take a look at ZPatterns/Transaction.py although its
not recommended for use (its deprecated in the current ZPatterns to look
at you'll have to check out an older version).

you can see how things get called by looking in 

ZopeHOME/lib/python/ZODB/Transaction.py to see the internals of a
transaction mechanics.

and you can see how the zodb manages these semantics for objects living
in the ZODB here.

zHOME/lib/python/ZODB/Connection.py


kapil