nerdexam
SOA

S90-09A · Question #8

Service A is a task service that is required to carry out a series of updates to a set of databases in order to complete a task. To perform the database updates Service A must interact with three…

The correct answer is A. Service A is updated to perform a logging routine when Service A receives a response message. Option A is correct because Service A already receives success/failure response messages from all three downstream services, making it the natural place to implement all three requirements: logging B's failures, triggering an email when C fails, and coordinating compensating…

Enterprise Integration Patterns

Question

Service A is a task service that is required to carry out a series of updates to a set of databases in order to complete a task. To perform the database updates Service A must interact with three other services, each of which provides standardized data access capabilities. Service A sends its first update request message to Service B (1), which then responds with a message containing a success or failure code (2). Service A then sends its second update request message to Service C (3), which also responds with a message containing a success or failure code (4). Finally, Service A sends a request message to Service D (5), which responds with its own message containing a success or failure code (6). You've been asked to change this service composition architecture in order to fulfill a set of new requirements: First, if the database update performed by Service B fails, then it must be logged by Service A. Secondly, if the database update performed by Service C fails, then a notification e- mail must be sent out to a human administrator. Third, if the database update performed by either Service C or Service D fails, then both of these updates must be reversed so that the respective databases are restored back to their original states. What steps can be taken to fulfill these requirements?

Exhibit

S90-09A question #8 exhibit

Options

  • AService A is updated to perform a logging routine when Service A receives a response message
  • BThe Compensating Service Transaction pattern is applied to Service B so that it invokes exception
  • CThe Atomic Service Transaction pattern is applied so that Services A, C, and D are encompassed
  • DNone of the above.

How the community answered

(31 responses)
  • A
    58% (18)
  • B
    13% (4)
  • C
    23% (7)
  • D
    6% (2)

Explanation

Option A is correct because Service A already receives success/failure response messages from all three downstream services, making it the natural place to implement all three requirements: logging B's failures, triggering an email when C fails, and coordinating compensating (rollback) calls to C and D when either update fails - all driven by the response codes it already processes.

Option B is wrong on two counts: the Compensating Service Transaction pattern addresses rollback logic for Services C and D (not B), and it would be Service A, not Service B, that orchestrates the compensation - Service B has no knowledge of the broader transaction context.

Option C is wrong because the Atomic Service Transaction pattern (think two-phase commit across services) is more restrictive than needed and is misapplied here; the requirement for C and D is compensating/rollback behavior, not an atomic lock, and grouping Service A itself into a data-access transaction doesn't make architectural sense.

Memory tip: Think "orchestrator owns the outcomes" - since Service A is the central coordinator that already sees every success/failure code, updating it to react to those codes (log, email, compensate) is always cheaper and cleaner than pushing cross-cutting concerns into the downstream data services.

Topics

#Compensating Service Transaction#logging#failure recovery#task service

Community Discussion

No community discussion yet for this question.

Full S90-09A Practice