René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

EJB (Enterprise Java Beans)

Also called Enterprise Beans.

Enterprise Java Beans are a major part of J2EE.

An application's business logic resides in Enterprise Java Beans,
thus seperating the business model from the presentation.

/java/ejb/java_beans.jpg

Types of EJB

Entity Beans

Entity Beans represent persistent busieness data, for example a row in a database table. They are shared between clients.

Session Beans

Session Beans implement logic that is specific to one client session. A session bean is not shared between clients.

Message-Driven Beans

The three simple requirements for a bean

Empty constructor

A bean must have zero argument constructor.

No public instance variables

No public instance variables

getSomePersistentValue(), setSomePersistentValue()

Persistent values should be accessed through calls to get...() and set...() methods.
Booleans' values are retrieved using isSomeBooleanValue()

Links