aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes diffrence between javabeans and ejb Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "diffrence between javabeans and ejb" Watch "diffrence between javabeans and ejb" New topic
Author

diffrence between javabeans and ejb

Dharmender Singh
Greenhorn

Joined: Jun 14, 2007
Posts: 16
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
Pavel Kubal
Ranch Hand

Joined: Mar 13, 2004
Posts: 356
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.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39576
    
  27
More discussion on this subject can be found at JavaBeansAndEnterpriseJavaBeans.


Ping & DNS - updated with new look and Ping home screen widget
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3697
    
    5

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.


My Blog: Down Home Country Coding with Scott Selikoff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: diffrence between javabeans and ejb
 
Similar Threads
difference between tagdir and uri
diff. between javabeans & ejb
what is meant by distributed?
javabeans
What is the diffrence between jsp:forward and response.sendRedirect