i am new to EJB and i havent worked with javabeans... can anyone explain me the difference between the both?
posted 11 years ago
Being quite new to J2EE, I will try to answer your question.
A EJB is an distributed object which resides on an application container (such as JBoss). It is used to contain business methods to perform some sort of actions. Also, EJBs are required to implement one or more of the EJB interfaces (i.e. Remote, Home, Local, etc.) They are called from some client to perform some action, and they can be persisted within some database.
JavaBeans are used, say when storing data from a form or something very trivial. They only require you to provide get/set methods for the fields within your class. I have used JavaBeans for interfacing to JSP/Servlets.
Hope this sort of helps and gets you pointed in the right direction.