Java - Dependency Injection (DI)

Java Conceptuel Diagram

About

Dependency injection in Java.

This page is about injection of a java dependency in a class.

Library

Specification

JSR 330: Dependency Injection for Java

The standard Java annotations for describing the dependencies of a class are defined in the Java Specification Request 330 (JSR330).

This specification describes the following annotations:

  • @Inject
  • and @Named

JSR-299 - Contexts and Dependency Injection (CDI)

Contexts and Dependency Injection (CDI) is specified by JSR-299

It's a programming model. Dependency injection is when the EJB container automatically supplies (or injects) a variable or setter method in the bean file with a reference to another EJB or resource or another environment entry in the bean's context.

Bean files supports dependency injection.

Implementation. See weld with Vertx





Discover More
Card Puncher Data Processing
JPA - Entity Manager

To manage entities in your persistence application, you need to obtain an javax/persistence/EntityManagerentity manager from an javax/persistence/EntityManagerFactoryEntityManagerFactory. An javax/persistence/EntityManagerEntityManager...
Java Conceptuel Diagram
Java - Annotations

Since Java version 1.5. An annotation is an element of the java programming language (modifier or Metadata tag) that can be associated with: Java classes, interfaces, constructors, methods,...
Java Conceptuel Diagram
Java - Dependency (of a class)

of a Jdeps - the Java class dependency analyzer See
Java Conceptuel Diagram
Java - Servlet Java class

A Servlet is an java object that receives a HTTP request and generates a HTTP response based on that request. A Java servlet is: a J2ee web component that responds to HTTP requests. a HTTP-specific...



Share this page:
Follow us:
Task Runner