• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

difference between EJB and Java bean ?

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 157
1
Android MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi siva, yes what you have written is correct. Beans are standard pojos in java while ejb is a business component which has server level support for functions like security, session management and transaction. In fact nothing is common.
 
siva chaitanya
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi harshvardhan thank you for your reply can you please give me some real time example of EJB and what is the use of exposing the business methods through EJB
 
harshvardhan ojha
Ranch Hand
Posts: 157
1
Android MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi siva, while writing any business logic, you need to have a controlled environment, and you need to manage a lot of things. So here you have ejb compliant servers.
So you don't need to manage all the system level services, which are already being managed by application servers like transactions,security,life cycle ,threading,persistence etc.

No one framework or component can resolve all business problem, so once you will learn EJB you will understand when to choose it and also you are going to appreciate the way it works.
 
Ranch Hand
Posts: 808
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EJBs are magic things. With simple @Stateless annotation you have a managed, transactional component that is monitored by application server. JavaBeans and EnterpriseJavaBeans have rather little in common.
 
You showed up just in time for the waffles! And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic