PROPAGATION_MANDATORY specifies that a method must be executed within a transaction, otherwise an exception will be thrown. This is useful when you have a method that should always be called within the context of an existing transaction, and you want to ensure that it is not accidentally executed outside of that context.
Consider the following scenario: you have a service layer method that updates a user’s information in the database. This method should only be called when there is an existing transaction, as it needs to be executed atomically with other database operations.
Let’s look at an example implementation of this service method using PROPAGATION_MANDATORY