Day 8. Transactions and Persistence

You have spent the last three days covering EJBs in detail. In particular, you saw yesterday how to specify, implement, configure and deploy container-managed persistence (CMP) Entity beans. Along with BMP Entity beans (Day 6, “Entity EJBs”) and Session beans (Day 5, “Session EJBs”), you now have a good appreciation of the EJB technology.

EJBs have been called transactional middle-tier components. Until now, you haven't had to worry too much about transactions in an EJB context because you have been using container-managed transaction demarcation. However, for those cases where you require explicit control, EJB provides two solutions. You can write beans that manage their own transactions—bean managed transaction ...

Get Sams Teach Yourself J2EE™ in 21 Days, Second Edition 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.