Package info.ejava.examples.ejb.tx.ejb
Class GetEJB
- java.lang.Object
-
- info.ejava.examples.ejb.tx.ejb.GetEJB
-
public class GetEJB extends Object
-
-
Field Summary
Fields Modifier and Type Field Description private EntityManageremprivate static org.slf4j.Loggerlogger(package private) TxWatcherEJBtxWatcher
-
Constructor Summary
Constructors Constructor Description GetEJB()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()ProductgetProduct(int productId)Returns a product from the database in the existing or no transaction.ProductgetProduct_NotSupported(int productId)ProductgetProduct_RequiresNew(int productId)intgetProductCount(int productId)intgetProductCount_NotSupported(int productId)intgetProductCount_RequiresNew(int productId)intgetRemainingQuantity(int productId)intgetShipmentCount(int productId)intgetShipmentCount_RequiresNew(int productId)voidinit()
-
-
-
Field Detail
-
logger
private static final org.slf4j.Logger logger
-
em
private EntityManager em
-
txWatcher
TxWatcherEJB txWatcher
-
-
Method Detail
-
init
@PostConstruct public void init()
-
destroy
@PreDestroy public void destroy()
-
getRemainingQuantity
public int getRemainingQuantity(int productId)
-
getProduct
public Product getProduct(int productId)
Returns a product from the database in the existing or no transaction. No transaction is required if none exists.
-
getProduct_NotSupported
public Product getProduct_NotSupported(int productId)
-
getProduct_RequiresNew
public Product getProduct_RequiresNew(int productId)
-
getProductCount
public int getProductCount(int productId)
-
getProductCount_RequiresNew
public int getProductCount_RequiresNew(int productId)
-
getProductCount_NotSupported
public int getProductCount_NotSupported(int productId)
-
getShipmentCount
public int getShipmentCount(int productId)
-
getShipmentCount_RequiresNew
public int getShipmentCount_RequiresNew(int productId)
-
-