EJB2 vs EJB3
EJB (Enterprise JavaBeans) is a Java API (Application Programming Interface) found within Java EE (Java Platform, Enterprise Edition) specification. EJB describes an architectural model for the development of enterprise applications. This is a managed server-side model that is able to capture the business logic of the enterprise application. IBM is EJB’s original creator who developed it in 1997. Sun Microsystems adopted it in 1999.
Before the introduction of EJB, it was found that solutions to problems found in back-end business code were frequently re-implemented by the programmers. As a result, EJB was introduced to address these common problems such as persistence, transactional integrity and security. EJB provides standard ways to handle these back end problems, by specifying how the application server should process transactions, integrate with JPA (Java Persistence API) services, handle concurrency control, handle JMS (Java Message Service) Events, resolve naming issues with JNDI (Java Naming and Directory Interface), develop secure programs with JCE (Java Cryptography Extension) and JAAS (Java Authentication and Authorization Service), deploy components, communicate remotely with RMI-IIOP (Java Remote Method Invocation interface over the Internet Inter-Orb Protocol), develop web services, invoke asynchronous methods and use the Timer service.