• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

The future of EJB 3 and Spring

clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Chris !
I still remember those days when I was hearing the words : Spring, Hibernate and the puzzle :
When I was hearing IoC, I was saying : What the hell is this ?
What is Spring, is it dangerous ?
Well, all these ideas disappeard last month when I decided to learn them and they shifted me to
a new whole world.
They are easy, powerfull and sexy ! and I can hardly wait EJB 3.
And here, my question live.
We all know by now that EJB 3 programming will be POJO programming (and all other cool features that EJB got them from Hibernate&Spring like annotaions, testing without a container ...).
Where do you see Spring and Hibernate after the releasing of EJB 3 ?
EJB still has its own tough cards in the game (Security, concurrency, distributed objects, Open Source Vendors like JBoss and Apache).
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I posted a brief answer on EJB3 versus Spring/Hibernate on this thread: https://coderanch.com/t/216038/ORM/java/EJB

EJB3 is definitely a huge improvement of EJB2. So much so that I would readily use it. However, once you dive into the details you will encounter various issues:

* Spring's dependency injection is a lot more powerful and flexible, e.g. inject POJOs into POJOs, create objects via factory methods etc. In comparison, JEE dependency injection is limited to injecting JNDI objects into a fixed set of objects (EJBs, Web tier components such as servlets etc)

* EJB3/JPA object/relational mapping is less flexible than Hibernate or JDO's. e.g. lack of support for collections of non-entity beans; only limited support for preserving the ordering of lists.

* Session beans still need to be deployed in order to test them. EJB microcontainers do help with this though. In comparison, Spring beans are testable without any kind of deployment.

I write about these and other issues in chapters 1 and 10. The example code the book also includes some EJB 3 examples.

In summary. I think that Spring (and Hibernate) has a very bright future among developers who are not tied to using standards.

    Bookmark Topic Watch Topic
  • New Topic