GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Using Qualifiers
  • Using Scopes
  • Giving Beans EL Names

This view

  • Original page
  • New address

GeezerVison is showing javaee.github.io — About Beans

Java Platform, Enterprise Edition (Java EE) 8
The Java EE Tutorial

Previous Next Contents

About Beans

CDI redefines the concept of a bean beyond its use in other Java technologies, such as the JavaBeans and Enterprise JavaBeans (EJB) technologies. In CDI, a bean is a source of contextual objects that define application state or logic. A Java EE component is a bean if the lifecycle of its instances may be managed by the container according to the lifecycle context model defined in the CDI specification.

More specifically, a bean has the following attributes:

  • A (nonempty) set of bean types

  • A (nonempty) set of qualifiers (see Using Qualifiers)

  • A scope (see Using Scopes)

  • Optionally, a bean EL name (see Giving Beans EL Names)

  • A set of interceptor bindings

  • A bean implementation

A bean type defines a client-visible type of the bean. Almost any Java type may be a bean type of a bean.

  • A bean type may be an interface, a concrete class, or an abstract class and may be declared final or have final methods.

  • A bean type may be a parameterized type with type parameters and type variables.

  • A bean type may be an array type. Two array types are considered identical only if the element type is identical.

  • A bean type may be a primitive type. Primitive types are considered to be identical to their corresponding wrapper types in java.lang.

  • A bean type may be a raw type.


Previous Next Contents
Oracle Logo  Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.