Chapter 1. What is a Bean?

This chapter will introduce us to beans and their history prior to Contexts and Dependency Injection (CDI) becoming a part of Java Enterprise Edition (Java EE). After a short history, we will define what a bean is and what characteristics and behavior a Java class requires to be considered a bean.

Note

JSR-299: Contexts and Dependency Injection for the Java EE platform was finalized in December 2009. CDI 1.1 is due to be released in the first half of 2013 to coincide with the release of Java EE 7.

The history of beans

Beans have been used to refer to many different kinds of Java classes over the years. The oldest use of a bean is from 1996, when Sun introduced JavaBeans as a term for a reusable software component for Java ...

Get JBoss Weld CDI for Java Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.