Exploring Transactions Across the J2EE Tiers

Distributed transactions in J2EE applications are supported by the EJB container (application server). Both the Web tier, and the EJB tier can provide distributed transaction capability, which means that they can access the UserTransaction interface. Applets and J2EE client applications are not required to provide distributed transaction support (and doing so is not recommended). We strongly recommend using distributed transactions through the EJB tier. As explained on Day 9, placing all your JDBC calls in EJBs ensures a high degree of server application portability. This relieves application developers from having to manage transaction control with explicit JDBC calls or JMS messages.

In the Web tier, ...

Get Sams Teach Yourself EJB in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.