An Enterprise JavaBeans (EJB) component, or enterprise bean, is a body of code having fields and methods to implement modules of business logic. You can think of an enterprise bean as a building block that can be used alone or with other enterprise beans to execute business logic on the Java EE server.
A session bean represents a transient conversation with a client. When the client finishes executing, the session bean and its data are gone.
A message-driven bean combines features of a session bean and a message listener, allowing a business component to receive messages asynchronously. Commonly, these are Java Message Service (JMS) messages.
In the Java EE 6 platform, new enterprise bean features include the following:
The ability to package local enterprise beans in a WAR file
Singleton session beans, which provide easy access to shared state
A lightweight subset of Enterprise JavaBeans functionality that can be provided within Java EE Profiles such as the Java EE Web Profile.