Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
If you are writing a service or component and need to use transactional services or if you need to monitor the state of a kernel transaction, you need to create a resource manager (RM).
To write a resource manager, you must create multiple kernel objects. The objects that an RM uses are:
First, create a TM object. There are two types of TMs:
To create a durable TM, you must either create a CLFS log and call CreateTransactionManager or have KTM create it for you. After a durable TM is created, you must first recover the TM by calling RecoverTransactionManager. After the TM is recovered, it is available for use.
If you recovered an existing TM, all RMs associated with this TM will start receiving recovery messages. For more information, see Recovery Processing.
Next, you create a resource manager by calling CreateResourceManager with the TM handle. The RM can be volatile or durable. Only durable TMs can be used with durable RMs.
When working transactionally, you enlist in the transaction by calling CreateEnlistmentand specifying which notifications to receive.
Note You can start receiving notifications before the call to CreateEnlistment is completed.
When you receive a notification, call the appropriate "Complete*" function when any work associated with processing the notification is completed. The complete functions are:
If at any time a resource manager is unable to complete the work of the transaction, or if continuing would render your application unable to undo the work done within the transaction, you must roll back the transaction by calling RollbackEnlistment.
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!