EJBs are deployment components means, when you develop an EJB you intend to use it on a(any) J2EE server. Like Java class can be run on any OS(with JVM), EJB can be deployed(read like installed) on any j2ee server. So when you develop a reusable EJBs(for say Payroll or Inventory management) these can be reused(if written/designed properly) on any server. EJBs also can used services provided by J2EE server like security, transaction control,object Pooling, life cycle management etc and you dont have to code for any of these services
Now javabeans, only similarity is then both have beens in name and are both written in java and have almost the same coding convention. Thats it.
Javabeans were more used to develop GUI components, the convention followed is it has attributes and getter/setter. These run on JVM where as EJBs run on j2ee server(read container)...
This is the most basic difference... Hope you got my point but if not read a few articles and should see this repeated in better words may be more understandable way
Santhosh
[ September 08, 2005: Message edited by: San Sreeds ]