A standard, universal @Transactional annotation is coming in Java EE 7. You can read more about the proposal here.
However, there are some important things to keep in mind:
- @Transactional is being developed as a revision to the JTA spec (as an MR)
- @Transactional is not being developed by the CDI EG, nor will it be in the CDI spec
- Feedback on @Transactional should be sent to the Java EE platform EG not to the CDI EG. The platform EG is conducting the revision to the JTA spec.
Java EE does not recognize a Servlet container as a compliant environment and therefore this feature will not be available there by default (mainly due to the absence of JTA in this environemnt).
However, to bridge the divide, Deltaspike will likely offer support for @Transactional in a Servlet environment since we acknowledge that it is important, and is an environment preferred by many developers (but we still strongly urge you to migrate to the web profile!!).
Created: 01. May 2012, 12:05 CET (Pete Muir)
How long will it be until Java EE gets something as basic as transaction management right?
Good news!
1) It is only a natural consequence to add declarative transaction control to managed beans.
2) I think that is is a very wise decision to root it in JTA. After all, if it was not rooted in JTA, what would be the semantics of @Transactional? An Entity Manager Transaction? JMS? Local? Distributed? JTA abstracts all these questions and offers a pluggable architecture for infrastructure that wants to participate in these transactions.
Go for it!
Good news! Now we have transactions available using @Stateless, but this way without EJB we can have transactions. I think JEE can have all functionalities provided by EJB, using CDI extensions! Why don't you provide a proposal to remove EJB and implement all functionalites of EJB using CDI extensions. Does EJB have any thing that can not be handled by CDI extensions?
Remote interfaces, instance pool for SLSB.
Hi Pete,
I have no deep understanding of JTA specs but I have some question:
Thanks.