This file contains 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
public class RestaurantParticipant implements Durable2PCParticipant { | |
Vote prepare() throws WrongStateException, SystemException; | |
void commit() throws WrongStateException, SystemException; | |
void rollback() throws WrongStateException, SystemException; | |
void unknown() throws SystemException; | |
void error() throws SystemException; | |
} |
This file contains 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
@AT(bridgeType=BridgeType.NONE) | |
@WebService | |
public class RestaurantServiceATImpl implements RestaurantServiceAT { | |
@WebMethod | |
@ServiceRequest | |
public void makeBooking() { | |
MockRestaurantManager.makeBooking(); | |
} |
This file contains 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
public class OrderParticipant implements | |
BusinessAgreementWithCoordinatorCompletionParticipant, | |
ConfirmCompletedParticipant { | |
void compensate() throws FaultedException, WrongStateException, SystemException { | |
EmailSender.sendEmail("Unfortunately, we have had to cancel your order for item: " + | |
MockOrderManager.getItem()); | |
} | |
void confirmCompleted(boolean confirmed) { |
This file contains 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); | |
} |
This file contains 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
@Stateless @Remote(Bistro.class) | |
@WebService() | |
@HandlerChain(file = "jaxws-handlers-server.xml") | |
@TransactionAttribute(TransactionAttributeType.MANDATORY) | |
public class BistroImpl implements Bistro | |
{ | |
@PersistenceContext protected EntityManager em; | |
@WebMethod | |
@ServiceRequest |
This file contains 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
@AT //By default bridge to JTA | |
@Stateless @Remote(Bistro.class) | |
@WebService() | |
@TransactionAttribute(TransactionAttributeType.MANDATORY) | |
public class BistroImpl implements Bistro | |
{ | |
@PersistenceContext protected EntityManager em; | |
@WebMethod | |
@ServiceRequest |
This file contains 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
@AT(bridgeType=BridgeType.NONE) | |
@Path("/") | |
public class RestaurantServiceATImpl implements RestaurantServiceAT { | |
@POST | |
@ServiceRequest | |
public void makeBooking() { | |
MockRestaurantManager.makeBooking(); | |
} |
This file contains 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 { | |
} |
This file contains 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 | |
@Stateless @Remote(Bistro.class) @WebService() | |
@TransactionAttribute(TransactionAttributeType.MANDATORY) | |
public class BistroImpl implements Bistro | |
{ | |
@DataManagement private Map txDataMap; | |
@PersistenceContext protected EntityManager em; | |
@WebMethod | |
@ServiceRequest |
This file contains 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 | |
@Stateless @Remote(Bistro.class) @WebService() | |
@TransactionAttribute(TransactionAttributeType.MANDATORY) | |
public class BistroImpl implements Bistro | |
{ | |
@PersistenceContext protected EntityManager em; | |
@WebMethod | |
@ServiceRequest | |
public void bookSeats(int howMany) { |
OlderNewer