Adam Bien's Weblog
Great Simplification With EJB [ Screencast ]
Esoteric and home grown transaction handling, as well as, manual JPA management can be replaced with a single @Stateless annotation:
In Java EE 7 you could replace a @Stateless with the ubiquitous @Transactional annotation. However, you will have to type 4 more characters for this purpose :-)
See also other screencasts at http://www.youtube.com/user/bienadam
Posted at 09:17AM May 04, 2012 by Adam Bien in Real World Java EE Patterns - Rethinking Best Practices | Comments[2] | Views/Hits: 10394
NEW Workshop: "JPA, NoSQL, Caching, Grids and Distributed Caches with Java EE 7", May 7th, 2013, Airport Munich
A book about rethinking Java EE Patterns
Tweet Follow @AdamBien

Thanks Adam.
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?
Posted by heidarzadeh on May 04, 2012 at 11:34 AM CEST #
@heidarzadeh,
"Good news! Now we have transactions available using @Stateless,"
Not now. Transactions in EJBs are available since 1998 :-).
"I think JEE can have all functionalities provided by EJB, using CDI extensions! "
Yes!
"Why don't you provide a proposal to remove EJB and implement all functionalites of EJB using CDI extensions. "
Why to remove them? From a higher level perspective EJBs could be considered as prebuilt aspects.
Btw. You can propose whatever you want. All Java EE mailing lists are open :-)
"Does EJB have any thing that can not be handled by CDI extensions?"
Everything could be built with CDI extensions. You could even built Servlets, JMS, or even a whole container implementations with CDI. E.g. parts of resin were built on CDI: http://www.caucho.com/resin/candi/
But: why? EJBs are an integral part of Java EE 6 and are not going to be deprecated in Java EE 7. So instead trying to replace them, I would combine them with CDI and other Java EE APIs and concentrate on the implementation of business logic. Our clients will appreciate it :-)
thanks for your comment!
adam
Posted by Adam Bien on May 04, 2012 at 11:12 PM CEST #