How to receive transaction callbacks for EJB and CDI beans

The JTA API gives a chance to receive callbacks on the event of a finishing transaction. As per specification, the transaction manager announces the even of beforeCompletion and afterCompletion which are defined by the interface javax.transaction.Synchronization. More in detail: beforeCompletion callback is invoked at time the transaction manager starts to commit the global transaction. The … Read more

Using Transactions in CDI Beans

Before Java EE 7, EJBs were the only component that supported declarative transactions. This made your CDI beans a popular option when used as a glue between the JSF side and the EJB side, which was in charge to complete the transactions declaratively. So, in other words you could choose to either bloat your CDI … Read more