• Post Reply Bookmark Topic Watch Topic
  • New Topic

Clarification needed about Dependency Injection in JavaEE

 
marios rossis
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!