Help

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!!).

5 comments:
 
01. May 2012, 14:11 CET | Link
Tetsuo

How long will it be until Java EE gets something as basic as transaction management right?

 
01. May 2012, 16:49 CET | Link

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!

 
01. May 2012, 21:05 CET | Link
Mehdi Heidarzadeh | heidarzadeh2(AT)gmail.com

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?

 
01. May 2012, 22:35 CET | Link
Adrian Mitev

Remote interfaces, instance pool for SLSB.

 
02. May 2012, 22:12 CET | Link

Hi Pete,

I have no deep understanding of JTA specs but I have some question:

  • In implementation level, which container would be responsible to handling @Transactional annotation? I mean, where the implementation like org.jboss.seam.transaction.Work and org.jboss.seam.transaction.AbstractUserTransaction will be placed?
  • Personally, I'm use EJB because I need to use @TransactionAttribute which is available only in EJB. If Java EE 7 released, why users need to use EJB? Could we just abandon EJB at all because it is the real culprit the made people saying, Java EE is heavyweight, Java EE is etc....

Thanks.

Post Comment
Name:
E-mail address (optional):
Homepage URL (optional):
Subject:
Help
Let me type some plain text, not markup
Enable live preview
Enter characters (ignore circles):