Skip to content

feat: add Service-Oriented Architecture pattern (#2937) - #3600

Open
ylcn91 wants to merge 2 commits into
iluwatar:masterfrom
ylcn91:feat/service-oriented-architecture
Open

feat: add Service-Oriented Architecture pattern (#2937)#3600
ylcn91 wants to merge 2 commits into
iluwatar:masterfrom
ylcn91:feat/service-oriented-architecture

Conversation

@ylcn91

@ylcn91 ylcn91 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds the Service-Oriented Architecture (SOA) pattern as a new service-oriented-architecture module, implemented in plain Java without frameworks so the architectural mechanism stays visible.

  • Key components:
    • Service: the contract every service exposes (name() and handle(ServiceRequest)); services are stateless.
    • ServiceRequest / ServiceResponse: coarse-grained, self-describing messages that form the interoperability boundary (flat payload, uniform response envelope).
    • ServiceRegistry: discovery by name on a ConcurrentHashMap, rejects duplicate registrations.
    • ServiceBus: routes messages to the registered service, applies cross-cutting concerns (tracing, timing) in one place and translates provider failures into error responses, so consumers only ever talk to the bus.
    • CustomerService, InventoryService, PaymentService: reusable atomic services.
    • OrderService: composite service that orchestrates the three atomic services through the bus to place an order.
    • App: bootstraps registry and bus, registers the services, places an order that succeeds, one that is rejected for stock, and addresses an unregistered service. Logging traces every message.
    • README.md: intent, real-world example, diagram, code walkthrough, applicability, real-world uses (ESBs, SOAP/WSDL), trade-offs, related patterns including how SOA differs from microservices. PlantUML class diagram under etc/.
  • Tests: 24 JUnit 5 tests covering registry, bus routing and error translation, each atomic service, and order orchestration (success, unknown customer, out of stock, payment declined), plus AppTest.
  • Module registered in the parent pom.xml. ./mvnw clean verify -pl service-oriented-architecture passes locally on JDK 21 and inside an eclipse-temurin:21 container.

Fixes #2937

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

PR Summary

Introduces a new service-oriented-architecture module implementing the SOA pattern in plain Java (no framework). Adds core building blocks (Service, ServiceRequest/ServiceResponse), a ServiceRegistry for discovery, a ServiceBus for routing with central cross-cutting concerns, and an AccessPolicy. Includes atomic services (Customer, Inventory, Payment) and a composite OrderService, plus an App bootstrap and 24 tests. Also adds documentation: README and UML diagrams. Updates parent pom to register the new module.

Changes

File Summary
pom.xml Updated to include new module service-oriented-architecture in the parent build.
service-oriented-architecture/README.md New README documenting the SOA pattern, its intent, real-world analogy, and Java example with class diagram and usage.
service-oriented-architecture/etc/service-oriented-architecture.urm.png PNG diagram (URD/M diagram) for the SOA pattern.
service-oriented-architecture/etc/service-oriented-architecture.urm.puml PlantUML diagram (URM) for the SOA pattern.
service-oriented-architecture/pom.xml New Maven module pom for the SOA module, including dependencies and main class configuration for App.
service-oriented-architecture/src/main/java/com/iluwatar/soa/AccessPolicy.java Implements AccessPolicy to control access to protected services, enforced by the ServiceBus.
service-oriented-architecture/src/main/java/com/iluwatar/soa/App.java Bootstrap and demonstration app wiring the registry and bus, registering services, and running sample flows.
service-oriented-architecture/src/main/java/com/iluwatar/soa/Customer.java Simple data type representing a Customer exposed by CustomerService.
service-oriented-architecture/src/main/java/com/iluwatar/soa/CustomerService.java Enterprise service exposing customer-related operations (getCustomer).
service-oriented-architecture/src/main/java/com/iluwatar/soa/InventoryService.java Inventory service with stock management: checkStock, reserve, release.
service-oriented-architecture/src/main/java/com/iluwatar/soa/OrderService.java Composite service that orchestrates the path through Customer, Inventory and Payment via the bus to place an order.
service-oriented-architecture/src/main/java/com/iluwatar/soa/PaymentService.java Payment service handling charge operations with a credit limit check.
service-oriented-architecture/src/main/java/com/iluwatar/soa/Service.java Service contract interface used by all providers and the bus.
service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceBus.java Bus that routes requests, applies cross-cutting concerns and translates provider failures into errors.
service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceRegistry.java Registry for publishing and looking up services by name.
service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceRequest.java Coarse-grained, self-describing message used to invoke services.
service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceResponse.java Unified envelope for service responses with success flag, body and message.
service-oriented-architecture/src/test/java/com/iluwatar/soa/AccessPolicyTest.java Unit tests for the AccessPolicy security model.
service-oriented-architecture/src/test/java/com/iluwatar/soa/AppTest.java Tests to ensure the App main launches without exceptions.
service-oriented-architecture/src/test/java/com/iluwatar/soa/CustomerServiceTest.java Tests for CustomerService behavior and error handling.
service-oriented-architecture/src/test/java/com/iluwatar/soa/InventoryServiceTest.java Tests for InventoryService stock handling, reservation and release.
service-oriented-architecture/src/test/java/com/iluwatar/soa/OrderServiceTest.java Tests for OrderService orchestration, stock reservation and failure scenarios.
service-oriented-architecture/src/test/java/com/iluwatar/soa/PaymentServiceTest.java Tests for PaymentService credit limit checks and operation handling.
service-oriented-architecture/src/test/java/com/iluwatar/soa/ServiceBusTest.java Tests for routing, access control and translation of errors by the bus.
service-oriented-architecture/src/test/java/com/iluwatar/soa/ServiceRegistryTest.java Tests for service registration and lookup, including duplicates.

autogenerated by presubmit.ai

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Pull request needs attention.

Review Summary

Commits Considered (1)
  • 993cea1: feat: add Service-Oriented Architecture pattern (#2937)
Files Processed (22)
  • pom.xml (1 hunk)
  • service-oriented-architecture/README.md (1 hunk)
  • service-oriented-architecture/etc/service-oriented-architecture.urm.puml (1 hunk)
  • service-oriented-architecture/pom.xml (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/App.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/Customer.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/CustomerService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/InventoryService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/OrderService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/PaymentService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/Service.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceBus.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceRegistry.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceRequest.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceResponse.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/AppTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/CustomerServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/InventoryServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/OrderServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/PaymentServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/ServiceBusTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/ServiceRegistryTest.java (1 hunk)
Actionable Comments (4)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/App.java [61-61]

    best_practice: "Fix incorrect logger usage in App.java"

  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceBus.java [57-57]

    best_practice: "Logger usage mismatch with Lombok @slf4j in ServiceBus"

  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceRegistry.java [56-56]

    best_practice: "Logger usage mismatch in ServiceRegistry"

  • service-oriented-architecture/src/main/java/com/iluwatar/soa/InventoryService.java [93-101]

    possible bug: "Malformed string concatenation in reserve() error path"

Skipped Comments (0)

@ylcn91

ylcn91 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Note on the automated review comments: LOGGER is the Lombok logger field name configured for this repository in lombok.config (lombok.log.fieldName = LOGGER), the same name every other module uses, so the code compiles as is. The multi-line string concatenation in InventoryService is a single expression and is covered by InventoryServiceTest. Local ./mvnw clean verify -pl service-oriented-architecture passes on JDK 21, also inside an eclipse-temurin:21 container.

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.03%. Comparing base (41625d8) to head (cd7ff04).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3600      +/-   ##
============================================
+ Coverage     83.79%   84.03%   +0.24%     
- Complexity     4277     4352      +75     
============================================
  Files          1121     1132      +11     
  Lines         15144    15343     +199     
  Branches        723      739      +16     
============================================
+ Hits          12690    12894     +204     
+ Misses         2159     2155       -4     
+ Partials        295      294       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ylcn91
ylcn91 force-pushed the feat/service-oriented-architecture branch from 993cea1 to 84e5c17 Compare September 3, 2026 09:43
@ylcn91

ylcn91 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Updated the branch to cover point 8 (Security) of the issue guidelines: the bus now enforces an AccessPolicy as a cross-cutting concern (protected services require a valid credential, denial returns an error response and services stay free of security code). OrderService forwards the caller's credential downstream and no longer references provider classes, only service names and message contracts. Added AccessPolicyTest and extra bus/order cases (32 tests, 99% instruction coverage), README section, sample output and class diagram updated. ./mvnw clean verify -pl service-oriented-architecture passes locally on JDK 21 and in an eclipse-temurin:21 container.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Pull request needs attention.

Review Summary

Commits Considered (1)
  • 84e5c17: feat: add Service-Oriented Architecture pattern (#2937)
Files Processed (24)
  • pom.xml (1 hunk)
  • service-oriented-architecture/README.md (1 hunk)
  • service-oriented-architecture/etc/service-oriented-architecture.urm.puml (1 hunk)
  • service-oriented-architecture/pom.xml (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/AccessPolicy.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/App.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/Customer.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/CustomerService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/InventoryService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/OrderService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/PaymentService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/Service.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceBus.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceRegistry.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceRequest.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceResponse.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/AccessPolicyTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/AppTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/CustomerServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/InventoryServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/OrderServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/PaymentServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/ServiceBusTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/ServiceRegistryTest.java (1 hunk)
Actionable Comments (1)
  • service-oriented-architecture/pom.xml [46-50]

    enhancement: "Missing JUnit Jupiter API test dependency"

Skipped Comments (0)

Comment thread service-oriented-architecture/pom.xml
@ylcn91
ylcn91 force-pushed the feat/service-oriented-architecture branch from 84e5c17 to 453f532 Compare September 3, 2026 09:52
@ylcn91

ylcn91 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up on the Codecov note: added OrderServiceTest cases with a stub inventory service (reservation fails after a successful stock check; stock check itself fails) and a ServiceBusTest case for a wrong non-null credential. 35 tests, the only uncovered line left is the implicit App constructor. Tests only. ./mvnw clean verify -pl service-oriented-architecture passes locally on JDK 21 and in an eclipse-temurin:21 container.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Pull request needs attention.

Review Summary

Commits Considered (1)
  • 453f532: feat: add Service-Oriented Architecture pattern (#2937)
Files Processed (24)
  • pom.xml (1 hunk)
  • service-oriented-architecture/README.md (1 hunk)
  • service-oriented-architecture/etc/service-oriented-architecture.urm.puml (1 hunk)
  • service-oriented-architecture/pom.xml (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/AccessPolicy.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/App.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/Customer.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/CustomerService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/InventoryService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/OrderService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/PaymentService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/Service.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceBus.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceRegistry.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceRequest.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceResponse.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/AccessPolicyTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/AppTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/CustomerServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/InventoryServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/OrderServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/PaymentServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/ServiceBusTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/ServiceRegistryTest.java (1 hunk)
Actionable Comments (1)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/InventoryService.java [92-100]

    possible bug: "Fix potential string concatenation bug in error message"

Skipped Comments (8)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/App.java [67-67]

    best_practice: "Logger usage mismatch with Lombok @slf4j"

  • service-oriented-architecture/src/main/java/com/iluwatar/soa/App.java [76-76]

    best_practice: "Replace LOGGER with log when using @slf4j"

  • service-oriented-architecture/src/main/java/com/iluwatar/soa/App.java [78-78]

    best_practice: "Consistent logging with Lombok"

  • service-oriented-architecture/src/main/java/com/iluwatar/soa/App.java [88-88]

    best_practice: "Consistent logging with Lombok"

  • service-oriented-architecture/src/main/java/com/iluwatar/soa/App.java [98-98]

    best_practice: "Consistent logging with Lombok"

  • service-oriented-architecture/src/main/java/com/iluwatar/soa/App.java [102-102]

    best_practice: "Consistent logging with Lombok"

  • service-oriented-architecture/src/main/java/com/iluwatar/soa/App.java [106-106]

    best_practice: "Consistent logging with Lombok"

  • service-oriented-architecture/pom.xml [36-50]

    test: "Add junit-jupiter-api as test dependency"

@ylcn91
ylcn91 force-pushed the feat/service-oriented-architecture branch from 453f532 to bf16d6e Compare September 3, 2026 11:32
@ylcn91

ylcn91 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Coverage follow-up: added AppTest.shouldBeInstantiable for the implicit App constructor, the last uncovered line. JaCoCo now reports 100% instruction, branch and line coverage. Verified locally on JDK 21 and in an eclipse-temurin:21 container.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • bf16d6e: feat: add Service-Oriented Architecture pattern (#2937)
Files Processed (24)
  • pom.xml (1 hunk)
  • service-oriented-architecture/README.md (1 hunk)
  • service-oriented-architecture/etc/service-oriented-architecture.urm.puml (1 hunk)
  • service-oriented-architecture/pom.xml (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/AccessPolicy.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/App.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/Customer.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/CustomerService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/InventoryService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/OrderService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/PaymentService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/Service.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceBus.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceRegistry.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceRequest.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceResponse.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/AccessPolicyTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/AppTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/CustomerServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/InventoryServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/OrderServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/PaymentServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/ServiceBusTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/ServiceRegistryTest.java (1 hunk)
Actionable Comments (0)
Skipped Comments (5)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/App.java [67-70]

    best_practice: "Use the correct Lombok logger field"

  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceBus.java [66-92]

    best_practice: "Logger usage should use the Lombok-provided 'log' field"

  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceRegistry.java [51-57]

    best_practice: "Logger usage should use the Lombok-provided 'log' field"

  • service-oriented-architecture/src/main/java/com/iluwatar/soa/InventoryService.java [93-98]

    readability: "Clarify error message construction"

  • service-oriented-architecture/pom.xml [36-39]

    best_practice: "Add junit-jupiter-api test dependency"

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Pull request needs attention.

Review Summary

Commits Considered (4)
  • 12e9aa7: fix: surface the inventory error when the stock check fails

OrderService reported every failed stock check as insufficient stock, which hid the real reason, for example a non-positive quantity. It now forwards the inventory message and only reports insufficient stock when the check itself succeeded.

  • 23462b6: docs: embed the rendered class diagram in the service-oriented-architecture README

Render etc/service-oriented-architecture.urm.puml to PNG and embed it in the detailed explanation section, matching the other modules, instead of the inline mermaid block.

  • a88f9d8: chore: tidy service javadoc and use the customer id in confirmations

Reword the App class javadoc so it describes the services the same way as the Service contract and the README: they keep no per-conversation state instead of being called stateless.

Note in OrderService.placeOrder that the checkStock call is there to illustrate service composition and not as a guard, since reserve re-checks the stock atomically.

Carry the customer id into OrderConfirmation so the confirmation identifies the customer it belongs to, and drop the unused email component from the Customer record. Update the tests, the URM diagram and the sample output in the README accordingly.

  • 83eb3c8: fix: reserve stock before charging and validate order quantity

  • OrderService now reserves stock before charging and releases the reservation when the charge fails, so a rejected order never leaves the customer charged.

  • InventoryService gains a release operation and rejects a non-positive quantity in checkStock, reserve and release.

  • ServiceBus applies the access policy before the registry lookup, so a denied caller cannot probe which services exist.

  • Corrected the statelessness and interoperability claims in the javadoc and the README.

  • Replaced the class diagram link with an inline mermaid diagram, refreshed the sample output and kept the puml in sync.

Files Processed (15)
  • service-oriented-architecture/README.md (1 hunk)
  • service-oriented-architecture/etc/service-oriented-architecture.urm.png (0 hunks)
  • service-oriented-architecture/etc/service-oriented-architecture.urm.puml (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/App.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/Customer.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/CustomerService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/InventoryService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/OrderService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/Service.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceBus.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceRequest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/CustomerServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/InventoryServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/OrderServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/ServiceBusTest.java (1 hunk)
Actionable Comments (1)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/InventoryService.java [102-109]

    bug: "Fix string concatenation in error message"

Skipped Comments (0)

@ylcn91
ylcn91 force-pushed the feat/service-oriented-architecture branch from 12e9aa7 to a569f16 Compare September 7, 2026 08:04
The order flow is now reserve, charge, release on failure. Inventory rejects non-positive quantities and its errors are surfaced, the access policy runs before the registry lookup, the statelessness and interoperability wording is corrected, and confirmations carry the customer id. The class diagram is a rendered PNG.
@ylcn91
ylcn91 force-pushed the feat/service-oriented-architecture branch from a569f16 to cd7ff04 Compare September 7, 2026 09:09

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (2)
  • cd7ff04: fix: reserve stock before charging and validate order quantity

The order flow is now reserve, charge, release on failure. Inventory rejects non-positive quantities and its errors are surfaced, the access policy runs before the registry lookup, the statelessness and interoperability wording is corrected, and confirmations carry the customer id. The class diagram is a rendered PNG.

  • bf16d6e: feat: add Service-Oriented Architecture pattern (#2937)
Files Processed (25)
  • pom.xml (1 hunk)
  • service-oriented-architecture/README.md (1 hunk)
  • service-oriented-architecture/etc/service-oriented-architecture.urm.png (0 hunks)
  • service-oriented-architecture/etc/service-oriented-architecture.urm.puml (1 hunk)
  • service-oriented-architecture/pom.xml (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/AccessPolicy.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/App.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/Customer.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/CustomerService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/InventoryService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/OrderService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/PaymentService.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/Service.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceBus.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceRegistry.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceRequest.java (1 hunk)
  • service-oriented-architecture/src/main/java/com/iluwatar/soa/ServiceResponse.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/AccessPolicyTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/AppTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/CustomerServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/InventoryServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/OrderServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/PaymentServiceTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/ServiceBusTest.java (1 hunk)
  • service-oriented-architecture/src/test/java/com/iluwatar/soa/ServiceRegistryTest.java (1 hunk)
Actionable Comments (0)
Skipped Comments (0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Service-Oriented Architecture pattern

1 participant