The <assembly-descriptor> section of an EJB-JAR is optional. I haven't been able to find an explicit statement anywhere on what happens if the Bean Provider specifies <transaction-type>Container</transaction-type> indicating CMT for this bean, however, no <trans-attribute>s are specified because the <assembly-descriptor> section has been omitted. In other words, what is the "default" CMT behavior (typically described by transaction attributes) if no transaction attributes are specified? Thanks
Providing the transaction attributes for an enterprise bean is an optional requirement for the Application Assembler, because, for a given enterprise bean, the Application Assembler must either specify a value of the transaction attribute for all the methods for which a transaction attribute must be specified, or the Assembler must specify none. If the transaction attributes are not specified for the methods of an enterprise bean, the Deployer will have to specify them.
You were correct in saying that the <application-descriptor> is optional, but the transaction attributes are not. If the application assembler does not specify them, then the Deployer must. The spec does not indicate a particular default behavior if a transacion attribute is not specified. I suppose it is vendor specific, but this should never happen, because the spec does not allow it.
Ok, I'll be more specific .. Here is the DD for a functional SFSB deployed on IBM WAS 5.0.2. The transaction type is "Container". The <assembly-descriptor> section is empty and there are no <trans-attribute> elements. What is the "default" behavior of the SFSB with CMT as typically described by transaction attributes? Thanks
Hey Chris: If you are preparing for the cert then you only need to know what is in the spec. The spec doesn't indicate what would happen in this situation. I suppose the way this situation would be handled is vendor specific. If you still *need* to know the answer, I would suggest referring to the WAS documentation.
By Default, transaction attribute for a method of a bean in the container-managed transaction demarcation is the REQUIRED attribute and the transaction attribute does not need to be explicitly specified.