GeekInterview.com
Series: Subject: Topic:
Question: 572 of 577

What are the differences between EJB and Java beans

Asked by: Interview Candidate | Asked on: Sep 1st, 2005
Showing Answers 1 - 26 of 26 Answers
satyanarayana.k

Answered On : 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

Yes  1 User has rated as useful.
  
Login to rate this answer.
satish chowdary

Answered On : Jul 19th, 2005

Plz send me what is dif in ejb& javabs?

  
Login to rate this answer.
satish

Answered On : Jul 19th, 2005

Hi difference between statefull & less? 

  
Login to rate this answer.
satish

Answered On : Jul 19th, 2005

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

  
Login to rate this answer.
kamal asiwal

Answered On : Jul 26th, 2005

Plz send me diff. between java beans and EJB.

  
Login to rate this answer.
Mohan

Answered On : Aug 2nd, 2005

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

  
Login to rate this answer.
SURYASNATA MISHRAI

Answered On : 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.

  
Login to rate this answer.
meenachi sundaram.s

Answered On : 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.

  
Login to rate this answer.
aneesh hamza

Answered On : Aug 10th, 2005

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

  
Login to rate this answer.
Pchal

Answered On : 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.

Yes  1 User has rated as useful.
  
Login to rate this answer.
Pavan

Answered On : 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. 

  
Login to rate this answer.
karthikeyan

Answered On : Sep 17th, 2005

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

  
Login to rate this answer.
bandi maruthi

Answered On : 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.

  
Login to rate this answer.
avinash

Answered On : Oct 8th, 2005

The ejb is interprocess component and javabeans are intraprocess component

  
Login to rate this answer.

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

  
Login to rate this answer.
Kiran

Answered On : 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 clentthanking youkiran

  
Login to rate this answer.
Murali

Answered On : Jul 13th, 2007

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

  
Login to rate this answer.
Chinu

Answered On : 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.

  
Login to rate this answer.
ramesh marka

Answered On : 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

  
Login to rate this answer.
naveen

Answered On : 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.

  
Login to rate this answer.
neeraj.kaushik285

Answered On : Nov 7th, 2007

Enterprise Java Beans are Deployable components and Java Beans are used to make Deployable components.Regards,Neeraj KaushikSCBCD certified

  
Login to rate this answer.
hemasundar

Answered On : Jun 13th, 2008

View all answers by hemasundar

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.

  
Login to rate this answer.
hemasundar

Answered On : Jun 13th, 2008

View all answers by hemasundar

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.

  
Login to rate this answer.

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.

  
Login to rate this answer.
aleemkh

Answered On : Jul 30th, 2008

View all answers by aleemkh

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.  

  
Login to rate this answer.
naresh17201

Answered On : Jul 14th, 2010

View all answers by naresh17201

1. Java beans live in a single local JVM (address spaces) and can be either visual or non-visualEJB are non-visual distributable components, which can live across multiple JVMs2. 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 componentsEJBs are server side applications (coarse grained componets) can be deployed with other componets into large applications.

  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.