A possible way to implement / specify this would be to reuse the javax.ejb.TransactionAttribute annotation but handle it as InterceptorBinding in CDI beans.
So instead of @Transactional(transaction=REQUIRES_NEW)
we could use @javax.ejb.TransactionAttribute(value=REQUIRES_NEW)
javax.ejb.TransactionAttribute is a simple annotation atm. We could add this as interceptor binding via our CDI Extension SPI
I'm not sure though what that would mean for EJBs in return. They would have to ignore this special Interceptor if the annotation is applied on an EJB.
Pete, does this issue mean to support EJBs @TransactionAttribute and stuff out of the box?
This would require a very deep integration with the EJB container and the support of various transaction models. Not sure if we really like to dig that deep. This is workwise basically a duplication of the EJB spec in this area. But technically it would be different because in EJB transactions are auto-on whereas in CDI they would still need to get applied automatically.