As far as i know
java bean has private member variable, getters and setter methods used to map the input parameters with the fields in the database and
EJB is a server side component has some business service methods and these methods called from the client side. Correct me if i am wrong and please tell me the exact difference.