• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Clarification needed about Dependency Injection in JavaEE

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to get a clear high-level understanding of classification/architecture/semantic/whatever about the whole dependency injection subsystem in JavaEE, and I'm a bit confused.

I've read many articles, specifications and (portions of) books, and this is what I got:

A - Inversion of Control is a programming practice
B - Dependency injection is a pattern that follows IoC (service locator is another example)
C - CDI is a Java service that implements DI with some additional features like context scopes etc.
D - Resource injection via @Resource annotation is a (old fashioned? just different?) way to inject resources registered in the JNDI namespace

My questions are:
1 - is any of the previous points wrong in any way?
2 - in this "picture", where do @EBJ, @PersistenceUnit, @PersistenceContext... injections collocate themselves? I mean, these are some injection mechanism but they're not resource injection nor CDI... what am I missing?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic