Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6966485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:11:53+00:00 2026-05-27T16:11:53+00:00

I have a design question which I think Domain events will solve but I

  • 0

I have a design question which I think Domain events will solve but I need to make sure I am going about it the correct way and that I understand Domain events correctly.

I have a change in one aggregate root which needs to make a change in the another aggregate root.

So when I make a change in my initiating aggregate root I will fire a domain event which will apply the change in the other aggregate root. If all goes well I have two database transactions which will be persisted.

Now if one fails (say the second), how do I resolve this or if the second goes through but my initiating change fails to persist?

I am assuming this is a single user system where everything happens synchronously so the second aggregate is committed before the first initiating aggregate.

JD

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:11:54+00:00Added an answer on May 27, 2026 at 4:11 pm

    It depends on how you have organized Unit of Work management in your application. In web app Unit of Work should be created every request and in this case you usually have one transaction within http request, which will be committed or rolled back after end of request.

    Of course you can create two separate transaction, but I do not recommend to do it inside your web app. In this case (if I would have such requirements) would rather use messaging architecture (take a look at http://www.nservicebus.com/ or http://masstransit-project.com/)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a question about style and design rather than syntax. I have domain
I have a pretty simple question which perhaps someone familiar with Server/Client design &
I have posted a question about multilanguage database design here, [] What are best
I have a PHP MySQL application which has a modular design. There are about
I have a design question about the use of Hibernate annotations and DAO pattern.
This is more of a general design question, but it will be implemented in
I have a potentially stupid question about a potentially stupid database design. Say I
I have a design question :) I want to have multiple servlets but I
I have a design/best practice question relating to MVC3. I have a front page
This is more of a general design question I guess... I have an Ajax

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.