Tags
Authors
Since the JSR-220 Expert Group introduced annotation-based dependency injection and the Java Persistence API as part of Java EE 1.5, it’s been possible to inject an EntityManager
or EntityManagerFactory
into most Java EE components using the dedicated @PersistenceContext
and @PersistenceUnit
annotations respectively.
Later, my JSR-299 Expert Group introduced a completely new approach to dependency injection, which ultimately came to be named Contexts and Dependency Injection for Java. Initially very controversial, CDI has over time become central to the Java EE platform—oops, I mean, Jakarta EE—and other technologies have adopted CDI, now in its sixth revision, as the base-level component model.
But back in CDI 1.0, I needed a way to bridge the gap between @PersistenceContext
and the @Inject
annotation supported by CDI.
And with CDI itself mired in FUD, I wasn’t exactly in a very strong political position to go asking the EE platform group to redefine their, at the time, pretty much brand-new dependency injection annotations in terms of the crazy new direction we were taking with CDI.