Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

javabean and EJB

 
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
 
Are you okay? You look a little big. Maybe this tiny ad will help:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!