I've run across this exact same scenario and my solution was to use
the System.TransactionScope to wrap the database and email interaction
across one distributed transaction. I believe that
System.TransactionScope uses MSDTC under the hood, which coordinates
with database and non-database resources alike, such as an smtp
server.
I've pondered the idea of extending the [Transaction] attribute so
that it uses TransactionScope instead of just the NHibernate one. If
I'm not mistaken, an
ADO.NET connection will automatically work within
the context of an MSDTC transaction...
> > On Tue, Sep 22, 2009 at 9:02 AM, Simone Busoli <
simone.bus...@gmail.com>wrote:
>
> >> The first part. BTW, transaction boundaries should be, well, at the
> >> boundaries, therefore on your controllers or web service endpoints.
> >> WRT everything transactional by default I don't think it should be a part
> >> of the project.
> >> On Tue, Sep 22, 2009 at 15:00, Kyle Baley <
k...@baley.org> wrote:
>
> >>> Which part? Making the service call transactional or making everything
> >>> transactional by default? In either case, is this something that should be
> >>> incorporated into S#arp?
>
> >>> On Tue, Sep 22, 2009 at 8:55 AM, Simone Busoli <
simone.bus...@gmail.com>wrote:
>
> >>>> Kyle, this is easilly accomplished with windsor and interceptors.
>