Subject: Re: [boost] [transaction] New Boost.Transaction library under discussion
Date: 2010-01-27 12:33:50
Zitat von Vicente Botet Escriba <vicente.botet_at_[hidden]>:
> strasser wrote:
>> Zitat von Bob Walters <bob.s.walters_at_[hidden]>:
>> IÂ´ve been thinking about introducing a RM category for that:
>> typedef one_phase_tag category;
>> //only supports one-phase commit.
>> typedef persistent_tag category;
>> //supports two-phase, persistent
>> typedef transient_tag category;
>> //supports two-phase, non-persistent
>> only when 2 or more persistent_tag RMs are used in a global
>> transaction the TM has to prepare both and write to its log to have a
>> unique commit point, otherwise the commit of the only persistent_tag
>> RM is the commit point.
>> (any ideas for a better name for "one_phase_tag"?)
is there a reason why this can't be a Service of the resource manager?
I don't have a clear definition of a Service so far, and neither does
the XA standard linked above.
services usually are domain-specific functions intended to be called
by the user interface (e.g. a function to get an instance of a
persistent object), not functions handling transactions itself, but is
there a reason why the optional interface for distributed transactions
can't use the usual service interface?
I can't think of one right now.
the concept would probably look something like this:
typedef unspecified services; //MPL sequence containing
typedef unspecified transaction;
typedef unspecified transaction_id; //must be POD
static bool const persistent=unspecified;
bool prepare_transaction(transaction &);
transaction_id get_transaction_id(transaction const &);
template<class InputIterator> //must yield transaction_id
void recover(InputIterator b,InputIterator e);
https://svn.boost.org/svn/boost/sandbox/persistent/libs/persistent/doc/html/boost/persistent/ResourceManager.html and https://svn.boost.org/svn/boost/sandbox/persistent/libs/persistent/doc/html/persistent/extending.html#persistent.extending.services for information about
the one_phase_tag RMs discussed above would be a RM that doesn't offer
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk