Transactional Interceptors in Java EE 7 - Request for feedback

Posted by arungupta on Oracle Blogs See other posts from Oracle Blogs or by arungupta
Published on Thu, 31 May 2012 06:00:00 +0000 Indexed on 2012/05/31 10:46 UTC
Read the original article Hit count: 239

Filed under:

Linda described how EJB's container-managed transactions can be applied to the Java EE 7 platform as a whole using a solution based on CDI interceptors. This can then be used by other Java EE components as well, such as Managed Beans.

ALT_DESCR

The plan is to add an annotation and standardized values in the javax.transaction package. For example:

@Inherited
@InterceptorBinding
@Target({TYPE, METHOD})
@Retention(RUNTIME)
public @interface Transactional {
   TxType value() default TxType.REQUIRED
}

And then this can be specified on a class or a method of a class as:

public class ShoppingCart {
   ...
   @Transactional
   public void checkOut() {...}
   ...
}

This interceptor will be defined as part of the update to Java Transactions API spec at jta-spec.java.net.

The Java EE 7 Expert Group needs your help and looking for feedback on the exact semantics. The complete discussion can be read here. Please post your feedback to [email protected] and we'll also consider comments posted to this entry.

© Oracle Blogs or respective owner

Related posts about /JavaEE