MZ Study Notes say: It is required that all the methods specified in a single container-transaction element be methods of the SAME enterprise bean. However, HF (Page 504) shows an example of Container-Managed transaction tag where multiple methods of multiple beans are shown in it. Please reply which is correct.
The EJB 2.0 spec - 17.4.1 Transaction attributes did say:
The Application Assembler uses the container-transaction elements to define the transaction attributes for the methods of session and entity bean home and component interfaces and for the onMessage methods of message-driven beans. Each container-transaction element consists of a list of one or more method elements, and the trans-attribute element. The container-transaction element specifies that all the listed methods are assigned the specified transaction attribute value. It is required that all the methods specified in a single container-transaction element be methods of the same enterprise bean.
You are right. I corrected my post in the other thread. I just wonder why this is not true regarding the method-permission element. I checked the section 21.3.2 of the spec (Application Assembler responsibilities) regarding the method-permission and it does not say that all the methods must be from the same bean, althought the example shown in page 445 shows this arrangement - notice the role employee appearing in two method-permission elements. Any ideas?
SCJP 1.4, SCBCD 1.3<br />IBM 141, 484, 486
today's feeble attempt to support the empire
Devious Experiments for a Truly Passive Greenhouse!