javaee / ejb-spec

See javax.ejb project for API. Contains legacy issues only.
https://github.com/javaee/javax.ejb
6 stars 1 forks source link

Decoupling the @TransactionAttribute annotation from the EJB component model. #8

Closed glassfishrobot closed 11 years ago

glassfishrobot commented 13 years ago

Currently the EJB @TransactionAttribute annotation can only be used with the EJB component model. With the introduction of managed beans and CDI, there are not many good technical reasons why the @TransactionAttribute annotation should not be used in managed beans as well. In fact, many developers that are wary of the EJB component model would opt to use this model instead. In addition, decoupling EJB services such as @TransactionAttribute from the component model moves towards removing one-off component models in Java EE in favor of unifying around managed beans/CDI.

You should be able to do something like:

@TransactionAttribute(RequiresNew) @RequestScoped public class OrderService{ ...

public void store()

{...}

}

Currently transactions are re-invented in various projects with custom interceptor bindings like @Transactional in CDI.

glassfishrobot commented 13 years ago

Reported by abien

glassfishrobot commented 12 years ago

mvatkina said: I'm not sure how to close this issue. But the CMT transactions are being discussed at the platform level, so the work is done there.

glassfishrobot commented 11 years ago

mvatkina said: reopening to close properly

glassfishrobot commented 11 years ago

mvatkina said: Duplicate of http://java.net/jira/browse/JTA_SPEC-5

glassfishrobot commented 13 years ago

Was assigned to mvatkina

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA EJB_SPEC-8

glassfishrobot commented 11 years ago

Marked as duplicate on Tuesday, December 4th 2012, 2:01:03 pm