What are the differences between EJB and Java beans

Showing Answers 1 - 44 of 44 Answers

satyanarayana.k

  • Jun 2nd, 2005
 

hi 
 
the main difference is Ejb componenets are distributed which means develop once and run anywhere. 
 
java beans are not distributed. which means the beans cannot be shared . 
 
rgds 
satyanarayana

satish chowdary

  • Jul 19th, 2005
 

plz send me what is dif in ejb& javabs?

  Was this answer useful?  Yes

satish

  • Jul 19th, 2005
 

hi 
difference between statefull & less? 

  Was this answer useful?  Yes

satish

  • Jul 19th, 2005
 

what r the distributed componenets are using in ejb& jms?

  Was this answer useful?  Yes

kamal asiwal

  • Jul 26th, 2005
 

plz send me diff. between java beans and EJB.

  Was this answer useful?  Yes

Mohan

  • Aug 2nd, 2005
 

JB used for reusable software components , EJB for distributed objects.

  Was this answer useful?  Yes

SURYASNATA MISHRAI

  • Aug 6th, 2005
 

Java bean components are visual components can customized through events and properties, ejbs used for multiuser, distributed, transactional services and processes not visible by user.

  Was this answer useful?  Yes

meenachi sundaram.s

  • Aug 7th, 2005
 

The main difference: 
Javabean is a reusable s/w component that can be developed & run within a single system. 
EJB is used in distributed environment. EJB is developed in one node made to run in any system.

  Was this answer useful?  Yes

aneesh hamza

  • Aug 10th, 2005
 

while bean are simple non-shareable components, EJBs are distributed in nature and is shareable across systems

  Was this answer useful?  Yes

Pchal

  • Aug 11th, 2005
 

 
In General Terms: 
 
JAVA BEAN: A Java Bean is a regular java class that has setters and getters to provide access to its state. 
 
EJB:  
A regular java class that has a method with some logic can be made into an EJB by providing a remote interface for the clients to use to get the bean logic and the home interface which actually creates the bean. This bean when created will become a full fledged Enterprise Java Bean when we customize it using the deployment descriptor and setting all necessary features.

Pavan

  • Sep 1st, 2005
 

some more differencesares: 
 
We can use Java Beans in stand-alone systems whereas EJBs are web-based and distributed. 
 
Java Beans doesn't require an application server but EJB require an application server like weblogic, JBoss, WebSphere,.....etc for deployment. 

  Was this answer useful?  Yes

karthikeyan

  • Sep 17th, 2005
 

actually EJB is a InterProcessing component and JavaBean is a IntraProcessing component.first one is serverdependent and second one is serverindependent.

  Was this answer useful?  Yes

bandi maruthi

  • Oct 3rd, 2005
 

1. EJB components are persistable components whereas  Bean component ate not persistable components.

2.EJB's can run another jvm where as Beans are run only local jvm.

  Was this answer useful?  Yes

avinash

  • Oct 8th, 2005
 

the ejb is interprocess component and javabeans are intraprocess component

  Was this answer useful?  Yes

Java Beans and EJB serves different purpose.

Java bean is a simple java class with getter and setter methods which stores data and can be passed to various methods in an application whereas EJB is Enterprise Java beans. Basically it is used to separate the business logic and converting it into a reusable distributed component. The term reusable means we can use the same component in same or different application. the term distributed means once we develop a component we can deploy that in another machine/JVM and can be accessed. This helps as a load balancing method also.

Prasanna Balaraman

  Was this answer useful?  Yes

Kiran

  • Apr 26th, 2006
 

There is good difference in satefull and stateless beans. In stateless bean there is no mater of mataining state of the client. In statefull bean we can maitain state of the clent

thanking you

kiran

  Was this answer useful?  Yes

Murali

  • Jul 13th, 2007
 

statefull maintains the state(information about the bean) of the bean.but stateless doesn't maintains  the state of the bean.

  Was this answer useful?  Yes

Chinu

  • Aug 16th, 2007
 

Yes actually EJB is advacned for beans. EJB can have more business logic than a simple bean.

bean is more over collection of setters and getters. It doesnt do any transactions & distributed things.

  Was this answer useful?  Yes

ramesh marka

  • Oct 11th, 2007
 

A state lession bean does't have state , even it does't remeber any state

Best EX : Teller Mission in Bank, just it count the money , how many 100's or 500's , but it does't remeber previous count cash.

A state full session bean having the sate it should remeber the state

Best Ex: customer using the ATM  with his Credit care or Debit card we can find out balance , means it's remeber the state

  Was this answer useful?  Yes

naveen

  • Oct 12th, 2007
 

Some more differences are:
We can use Java Beans in stand-alone systems whereas EJBs are web-based and distributed.

Java Beans doesn't require an application server but EJB require an application server like weblogic, JBoss, WebSphere,.. etc for deployment.

  Was this answer useful?  Yes

neeraj.kaushik285

  • Nov 7th, 2007
 

Enterprise Java Beans are Deployable components and Java Beans are used to make Deployable components.

Regards,

Neeraj Kaushik
SCBCD certified

  Was this answer useful?  Yes

hemasundar

  • Jun 13th, 2008
 

A java bean is a java class having setters and getters and optionally may contain business logic[in small scale apps]. To use a java bean u don't need any thing other than tha JVM.
On the other hand an EJB is a component that is deployed in a Applicatio server. To use an EJB u mst need an Application Server[such as web logic,websphere,JBOSS, etc]. An EJB contains a critical businness component.

  Was this answer useful?  Yes

hemasundar

  • Jun 13th, 2008
 

SLSB mainly for iits opertion Pool[ a readily available object] and can't rememeber the request data among multiple requests by the user. Ann SFSB uses CACHE for its operation. It remembers data across multiple requests.

  Was this answer useful?  Yes

A Javabean is a simple java class with getter and setter methods and which are accesed and written in the client and which dont require a container or a deployment,
where as EJB is a server component with the business logic which is written once and can be deployed in a conatiner.Ejbs can be accesed by the remote clients and they are accessible uring the runtime where javabean is accesed during the compilation time.

  Was this answer useful?  Yes

aleemkh

  • Jul 30th, 2008
 

JavaBeans are just regular class files. They have get and set methods only. They are not controlled by separate EJB server like JBOSS etc, They can easily work on JVM itself and they dont require any application/EJB server.

EJB'S also have get and set methods but they run only on EJB server or the Application server which can run EJB'S.  The invocatiion of EJB is controlled by EJB Server. The clients cannot directly interact with EJB'S, the Server interrupts the client and verifies if the EJB has to be invoked, and once the EJB performs its operation  the results are sent to client. the EJB server also applies lot of security measures on EJB.  

  Was this answer useful?  Yes

naresh17201

  • Jul 14th, 2010
 

1. Java beans live in a single local JVM (address spaces) and can be either visual or non-visual
EJB are non-visual distributable components, which can live across multiple JVMs
2. Java beans designed to be reusable in varity of different environments and there is no services like transaction etc.
EJB provides services like instance pooling, multithreading, security, transaction and lifecycle management.
3. Java beans are software componets (fine grained) can be used to coarse grained components
EJBs are server side applications (coarse grained componets) can be deployed with other componets into large applications.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions