Skip to content

Instantly share code, notes, and snippets.

@paulrobinson
Created May 16, 2012 08:22
Show Gist options
  • Save paulrobinson/2708671 to your computer and use it in GitHub Desktop.
Save paulrobinson/2708671 to your computer and use it in GitHub Desktop.
WSBA with TXFramework
@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