Created
May 16, 2012 08:22
-
-
Save paulrobinson/2708671 to your computer and use it in GitHub Desktop.
WSBA with TXFramework
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @BA | |
| @WebService | |
| public class OrderServiceBAImpl implements OrderServiceBA { | |
| @DataManagement private Map txDataMap; | |
| @WebMethod @ServiceRequest | |
| public void placeOrder(String item) throws OrderServiceException { | |
| txDataMap.put("value", item); | |
| } | |
| @ConfirmCompleted | |
| void confirmCompleted(boolean confirmed) { | |
| if (confirmed) | |
| EmailSender.sendEmail("Your order is now confirmed " + | |
| "for the following item: " + txDataMap.get("value")); | |
| } | |
| @Compensate | |
| private void doCompensate() { | |
| EmailSender.sendEmail("Unfortunately, we have had to cancel " + | |
| "your order for item: " + txDataMap.get("value")); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment