Created
May 16, 2012 08:55
-
-
Save paulrobinson/2708841 to your computer and use it in GitHub Desktop.
@CompensatedBy
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(serviceName = "OrderServiceBAService", portName = "OrderServiceBA", name = "OrderServiceBA", targetNamespace = "http://www.jboss.com/as/quickstarts/helloworld/wsba/participantcompletion/order") | |
| @SOAPBinding(style = SOAPBinding.Style.RPC) | |
| @WebServlet("/OrderServiceBA") | |
| public class OrderServiceBAImpl implements OrderServiceBA { | |
| @WebMethod @ServiceRequest | |
| @CompensatedBy(compensationMethod = "cancelOrder", confirmMethod = "confirmMethod2") | |
| public void placeOrder(String item) throws OrderServiceException { | |
| } | |
| public void cancelOrder(String item) { | |
| EmailSender.sendEmail("Unfortunately, we have had to cancel your order for item '" + item + "'"); | |
| } | |
| public void confirmOrder(String item) { | |
| EmailSender.sendEmail("Your order is now confirmed for the following item: '" + item + "'"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment