EJB and RMI
RMI and EJB offer technology for the development, installation, and management of distributed Java applications in the enterprise, Java developers frequently ask whether one is a better option than the other for their given architectures. This article provides demonstrations for using RMI and EJB technologies.
Since their introduction in 1997, Remote Method Invocation (RMI) and Enterprise JavaBeans (EJB) have represented a new direction in the development, installation, and management of distributed Java applications in the enterprise. The surprisingly powerful RMI guided Java developers into the world of distributed object transactions, while the componential architecture of EJB greatly simplified
the development and management of corporate applications.
Today, Java developers frequently ask whether using EJB is even necessary when they can easily do the same things using only RMI and vice versa in some cases. Certainly, you can use pure RMI to work with distributed objects in an architecture that also partially uses EJB, but whether you choose RMI or EJB depends almost completely on your needs and the required scalability of your application.
For more information refer the attachment.