Jesus Angeles wrote:
1) Is container-transaction tag, or its corresponding bmt tag, required? Or is there a default? E.g. if I dont declare any container-transaction tag like below, all methods of 'theEjb' will have the default transaction attributes (e.g. whatever is the default, e.g. 'Supports')?
The tag is not mandatory. If the tag is not present, then I think it means bean-managed. If it is bean-managed, the transaction attributes do not come into play at all.
Jesus Angeles wrote:
2) If I have a method 'method2', with the definition below, specified, what will method2's transaction attribute going to be in runtime? Supports? or NotSupported ? or Never? etc.?
As far as I remember, the default value was not well-defined in the specification for
EJB 2 - I think it was corrected in EJB 3. So, in EJB 2, the default value differed between vendors.
You can use the '*'
pattern in the method name and provide a transaction attribute for all methods at one stretch. Like:
So, you can define one for a specific method and define another attribute for the rest.