Annotation Type TransactionAttribute
- 
 @Target({METHOD,TYPE}) @Retention(RUNTIME) public @interface TransactionAttribute TheTransactionAttributeannotation specifies whether the container is to invoke a business method within a transaction context. TheTransactionAttributeannotation can be used for session beans and message driven beans. It can only be specified if container managed transaction demarcation is used.The annotation can be specified on the bean class and/or it can be specified on methods of the class that are methods of the business interface or no-interface view. Specifying the TransactionAttributeannotation on the bean class means that it applies to all applicable business methods of the class. Specifying the annotation on a method applies it to that method only. If the annotation is applied at both the class and the method level, the method value overrides if the two disagree.The values of the TransactionAttributeannotation are defined by the enumTransactionAttributeType. If theTransactionAttributeannotation is not specified, and the bean uses container managed transaction demarcation, the semantics of theREQUIREDtransaction attribute are assumed.- Since:
- EJB 3.0
- See Also:
- TransactionAttributeType
 
- 
- 
Optional Element SummaryOptional Elements Modifier and Type Optional Element Description TransactionAttributeTypevaluevalue.
 
- 
- 
- 
Element Detail- 
valueTransactionAttributeType value value. - Returns:
- a TransactionAttributeTypeobject.
 - Default:
- jakarta.ejb.TransactionAttributeType.REQUIRED
 
 
- 
 
-