Skip to content

Instantly share code, notes, and snippets.

@paulrobinson
Created May 16, 2012 08:55
Show Gist options
  • Select an option

  • Save paulrobinson/2708841 to your computer and use it in GitHub Desktop.

Select an option

Save paulrobinson/2708841 to your computer and use it in GitHub Desktop.
@CompensatedBy
@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