Win a copy of Spark in Action this week in the Open Source Projects forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

EJB Approach Vs IoC

 
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends
I have used EJB and now trying to understand and get into the world of Spring and definitely decided it is very good after reading about Dependency Injection and its advantage to allow different framework integration and Layer abstractions.

My question is what is exactly different between the approachs of EJB and IoC.

I understand EJB container does callbacks into the component, and I believe it is the same which IoC which does interms of dependency injection through constructors or setters?

Please help for me to clarify the concepts.

Thanks
Farouk
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

My question is what is exactly different between the approachs of EJB and IoC.


Completely different, but that would be too long to explain
Actually, it's not a matter of EJB against IoC, which are different topics. Main thing is that you don't need to obey to the EJB container's needs (multiple interfaces). Your beans will be simple POJOs, making them really easy to test out of the container.
 
Mohamed Farouk
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok thanks for your reply, let me ask my question in another way?
Does EJB framework based on IOC ?
If not please can you explain why?
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are hundreds of websites that already discuss what you are asking. Doing a Google search for "EJB IoC" (without quotes) turns up quite a few discussions on how these 2 technologies work and work together.

No sense is repeating all that wonderful information here.
 
We cannot change unless we survive, but we will not survive unless we change. Evolving tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic