A Java Bean is a software component written in the Java programming language that conforms to the JavaBeans component specification. The JavaBeans APIs became part of the "core" Java APIs as of the 1.1 release of the JDK.
The JavaBeans specification defines a Java-based software component model that adds a number of features to the Java programming language. Some of these features include:
Enterprise JavaBeans (EJBs) are Java-based software components that are built to comply with Java's EJB specification and run inside of an EJB container supplied by a J2EE provider. An EJB container provides distributed application functionality such as transaction support, persistence and lifecycle management for the EJBs.
Java Beans and EJBs are used for different purposes altogether, though both specifications are provided by Sun micro Systems. Java Beans are mainly meant for building extendable components and typically contain getters and setters for all its data members, along with other required functionality. EJBs are server side programs that typically implement middle layer business functionality, providing 3 - layer architecture for applications. EJBs can be Entity,Session or Message depending on the required functionality. Most of the critical services are provided by EJB containers and thus allowing the programmmer to concentrate on the business logic on hand.
Visit for more information.http://www.roseindia.net/ejb/