public class WarehouseFacadeEJB extends Object implements WarehouseRemote
| Modifier and Type | Field and Description |
|---|---|
private CreateEJB |
beanA |
private UpdateEJB |
beanB |
private GetEJB |
beanC |
private BmtCreateEJB |
bmtA |
private SessionContext |
ctx |
private static org.slf4j.Logger |
logger |
private WarehouseTxEJB |
txHelper |
private TxWatcherEJB |
txWatcher |
| Constructor and Description |
|---|
WarehouseFacadeEJB() |
| Modifier and Type | Method and Description |
|---|---|
int |
cleanup() |
Product |
createProductAndRollback(Product product) |
Product |
createProductAndShipments_Async(Product product,
int quantity) |
Product |
createProductAndShipments_NotSupported(Product product,
List<Shipment> shipments) |
Product |
createProductAndShipments_RequiresNew(Product product,
List<Shipment> shipments) |
Product |
createProductAndShipments(Product product,
List<Shipment> shipments)
The method creates an overall transaction and enlists the work of three
separate EJBs to complete the work.
|
Product |
createProductAndThrowChecked(Product product) |
Product |
createProductAndThrowCheckedRollback(Product product) |
Product |
createProductBmt(Product product) |
void |
destroy() |
Product |
getProduct(int productId) |
void |
init() |
private static final org.slf4j.Logger logger
private SessionContext ctx
private WarehouseTxEJB txHelper
private TxWatcherEJB txWatcher
private CreateEJB beanA
private UpdateEJB beanB
private GetEJB beanC
private BmtCreateEJB bmtA
@PostConstruct public void init()
@PreDestroy public void destroy()
public int cleanup()
cleanup in interface WarehouseRemotepublic Product getProduct(int productId)
getProduct in interface WarehouseRemotepublic Product createProductAndShipments(Product product, List<Shipment> shipments) throws UnexpectedState
createProductAndShipments in interface WarehouseRemoteUnexpectedStatepublic Product createProductAndShipments_NotSupported(Product product, List<Shipment> shipments) throws UnexpectedState
createProductAndShipments_NotSupported in interface WarehouseRemoteUnexpectedStatepublic Product createProductAndShipments_RequiresNew(Product product, List<Shipment> shipments) throws UnexpectedState
createProductAndShipments_RequiresNew in interface WarehouseRemoteUnexpectedStatepublic Product createProductAndShipments_Async(Product product, int quantity) throws UnexpectedState
createProductAndShipments_Async in interface WarehouseRemoteUnexpectedStatepublic Product createProductAndThrowChecked(Product product) throws MyCheckedProductException
createProductAndThrowChecked in interface WarehouseRemoteMyCheckedProductExceptionpublic Product createProductAndThrowCheckedRollback(Product product) throws MyCheckedRollbackProductException
createProductAndThrowCheckedRollback in interface WarehouseRemoteMyCheckedRollbackProductExceptionpublic Product createProductAndRollback(Product product)
createProductAndRollback in interface WarehouseRemotepublic Product createProductBmt(Product product)
createProductBmt in interface WarehouseRemoteCopyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.