A Java Bean (not to be confused with an Enterprise Java Bean -- completely different beast) is simply a class that has a default (no-argument) constructor, can be serialized, and exposes its member variable through getters and setters.
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
I was asked this question before but I couldn't give a straight answer. I think this thread is the right place to ask... So what IS the difference between a JavaBean and EJB?
Couldn't you have some of the the same characteristics of a bean be put into an EJB? Say I want to write a stateless session EJB; couldn't I create methods to implement business logic in either type of bean? (I'm ignoring the remote and home interfaces for now and focusing on just the beans.) [ January 28, 2005: Message edited by: Joe Tseng ]
So from your comment, my impression is that an EJB can be a JavaBean with alot more crap piled on top of it (remote/home/local-home interfaces) that have certain aspects of its behavior and interaction controlled by the J2EE container/server, right?