Class AggregateRolledBackException

All Implemented Interfaces:
Serializable

public class AggregateRolledBackException extends AxonException
Exception indicating that an aggregate has been part of a Unit of Work that was rolled back and that the validity of its state cannot be guaranteed.

This typically occurs when multiple nested Units of Work operate on the same Aggregate instance, and that one of these Units of Work has been rolled back. In such case, the parent Unit of Work cannot guarantee that the state of the Aggregate is correct, and should (in such case) be rolled back.

See Also:
  • Constructor Details

    • AggregateRolledBackException

      public AggregateRolledBackException(String aggregateIdentifier)
      Initialize the exception for an aggregate with given aggregateIdentifier.
      Parameters:
      aggregateIdentifier - The identifier of the compromised aggregate
  • Method Details

    • getAggregateIdentifier

      public String getAggregateIdentifier()
      Returns the identifier of the compromised aggregate.
      Returns:
      the identifier of the compromised aggregate