Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

javabean and EJB  RSS feed

 
Balaji Anand
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am new to EJB and i havent worked with javabeans... can anyone explain me the difference between the both?
 
Zak Nixon
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Zak Nixon
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!