There exists a .Internet application that initiates a transaction using NHibernate and modify data within the database X. Among this transaction we problem calls to some WebService (.Internet too), which modifies database X and perhaps modifies other databases.
It is possible to method to share this transaction between your two programs without needing to write an origin manager for that webservice? (it's the only method I see)
Just how can the applying that initiates the transaction be familiar with (and control) the database transactions the WebService begins?
If you work with WCF, then it is relatively easy. All you want do is put the [cde] around the techniques in your contract which you need to possess a transaction flow through it.
Then, you'd produce a [cde] instance round the database call and the phone call to the net service around the client, and also the transaction is going to be matched involving the call towards the database and also the web service.
IIRC, you'll need the Distributed Transaction Controller service running to be able to coordate the transaction.
If you're not using WCF, then yes, you will need to produce a resource manager. The easiest way would be to most likely possess a resource manager specific towards the two assets you are attempting to handle within the specific transaction and employ compensating transactions to commit/rollback with respect to the condition from the reactions in the individual assets taking part within the transaction.