Vinay,
EJB is much more closely related to RMI than JavaBeans. One way to think of EJB: it's RMI with some high-level enterprise services added (transactional processing, persistence management, lifecycle management).
------------------
Jim
author of:
Java Distributed Computing Java Enterprise in a Nutshell : A Desktop Quick Reference Java Enterprise Cd Bookshelf