On 2008-01-22 14:09, Stuart Bishop wrote: > M.-A. Lemburg wrote: > >> It only needs to be defined in the context of the module exposing >> that recover API, since you'd only pass it back to the methods of >> that same API. >> >> We could just describe the transaction id as object in the spec and >> then have the modules decide what type this maps to, e.g. one module >> might want to use a tuple (or even namedtuple) for this, another >> might not want to bother at all and use the internal representation >> mapped to a string or bytes object. > > > From the XA pdf you linked to earlier on xa_recover: > > "A transaction manager calls xa_recover() during recovery to obtain a > list of transaction branches that are currently in a prepared or > heuristically completed state. > > [...] > > "It is the transaction manager's responsibility to ignore XIDs that do > not belong to it. > > So if you where to implement an XA like interface around this, how can a > transaction manager filter out the irrelevant XIDs if is cannot interrogate > them?
Good point, but I actually think that this refers to the TM storing the XIDs it knows about and ignoring any other XIDs returned by the recover method. I don't think that the TM is required to understand the format of the XID since the resource managers fill in that data and only they have to be able to recognize it. Then again, it may be useful for other purposes. Since there are only two id components that appear to be relevant, how about using a 2-tuple for the transaction id ? > If behaviour of the xids returned by tpc_recover is not defined, we need > another method to decompose an xid into its global transaction id and its > branch id. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jan 22 2008) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 _______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig