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

Comments:

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 01:34 PM 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 05, 2012 at 01:12 AM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
...the last 150 posts
...the last 10 comments
License