• 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

diffrence between javabeans and ejb

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can anybdy tell me that what is the diffrence between javabeans and ejb and can we run the javabeans in ejb container

thanks in advance,
dharmender singh
 
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java Beans are basically data containers. Simple class with private or protected member variables and getters and setters for each of them. Usually a no-arg constructor is required as well. These components are used to transfer data from one component to another.

While Enterprise Java Beans are distributed server-side components, which must be run in an EJB container. This is one difference - JB can be run anywhere, but EJB only in the server JVM. Whatsmore, EJB come in three flavours - Session for performing business logic, Entity for persistence (nowadays it's called JPA) and Message driven for messaging.

This should be enough for knowing the difference, if you'd like any specific details, don't hesitate to ask.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
More discussion on this subject can be found at JavaBeansAndEnterpriseJavaBeans.
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Best advice I can give you this: Just because their names are similar, don't assume they are in anyway related.

Its like someone saying that Javascript is the same as Java. Bad use of naming. EJBs are heavy-weight modules that require specialized J2EE servers whereas java beans can be made out of almost any class with very little overhead. Just ignore the overused naming and consider them distant relatives.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic