Package com.homannsoftware.transactions
Class JakartaCheckoutService
java.lang.Object
com.homannsoftware.transactions.JakartaCheckoutService
Demonstrates the Jakarta Transactions annotation on a Spring-managed bean.
-
Constructor Summary
ConstructorsConstructorDescriptionJakartaCheckoutService(CheckoutRepository repository) Creates the alternative checkout service. -
Method Summary
-
Constructor Details
-
JakartaCheckoutService
Creates the alternative checkout service.- Parameters:
repository- SQL adapter sharing the application's DataSource
-
-
Method Details
-
checkout
Applies the same business operation using Jakarta transaction metadata.- Parameters:
orderRef- nonblank reference of at most 80 characterssku- nonblank product identifier of at most 40 charactersquantity- positive number of units- Throws:
IllegalArgumentException- if an argument is invalidOutOfStockException- if the product is missing or insufficient
-