EJB (Enterprise Java Bean) is used to develop scalable, robust and secured enterprise applications in java.
Unlike RMI, middleware services such as security, transaction management etc. are provided by EJB Container to all EJB applications.
The current version of EJB is EJB 3.2. The development of EJB 3 is faster than EJB 2 because of simplicity and annotations such as @EJB, @Stateless, @Stateful, @ModelDriven, @PreDestroy, @PostConstruct etc.