Reviewing Transaction Attributes with CMT

Transaction attributes were briefly covered on Day 16. Here you'll learn more about using transaction attributes to control the scope of a container-managed transaction. When methodA of EJB1 invokes methodB of EJB2 (see Figure 17.2), the scope of the transaction depends on the transaction attribute setting of methodB in the deployment descriptor of EJB2.

Figure 17.2. Transaction scope.

Table 17.1 summarizes the effects of the transaction attribute of methodB on the scope of the originated transaction. In this table, both T1 and T2 are transactions that are controlled by the container. The T1 transaction ...

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.