Originally posted by Winston Smith:
... but the idea that JavaBeans are client-side and EJBs are server-side?
As you pointed out, this is not the correct distinction. A JavaBean is just a class that conforms to some very basic standards: get/set accessors for its attributes, optional operations (methods) that act on the data, property change listening and vetoing. Beyond that, you're free to work with JavaBeans in any manner that makes sense for your application.
Enterprise JavaBeans are JavaBeans with many more restrictions as well as a predefined usage pattern. The main difference is that EJBs are managed by an EJB container; you don't create them yourself. Another major difference is that they were designed to be distributed components that you wire together to achieve functionality.
The container provides a standard set of services to your EJBs: transactional sematics, pooling, lookup, load-balancing, fault-tolerance, etc. Your wouldn't normally ask yourself, "Should I use a JavaBean or an EJB for this?" as they handle different problems.
For example, while you could use a JavaBean to hold the values entered through a form, you'd use EJBs to read/write the form values to a database in a transactional (all or nothing) manner.