ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Java Related >> Java J2EE >> Core Java
 
 


 

 
 Core Java interview questions  Core Java Interview Questions (1721)
 Advanced Java interview questions  Advanced Java Interview Questions (331)
 Swing interview questions  Swing Interview Questions (44)
 EJB interview questions  EJB Interview Questions (134)
 Servlets interview questions  Servlets Interview Questions (255)
 Struts interview questions  Struts Interview Questions (196)
 JDBC interview questions  JDBC Interview Questions (187)
 JMS interview questions  JMS Interview Questions (9)
 SunOne interview questions  SunOne Interview Questions (3)
 J2EE interview questions  J2EE Interview Questions (71)
 Weblogic interview questions  Weblogic Interview Questions (146)
 Websphere interview questions  Websphere Interview Questions (14)
 Java Networking interview questions  Java Networking Interview Questions (20)
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions (87)
Question
What advantage does an entity bean have over a sessin bean?
 Question Submitted By :: Core-Java
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
Entity Bean is a Java class which implements an Enterprise
Bean interface and provides the implementation of the
business methods. There are two types: Container Managed
Persistence (CMP) and Bean-Managed Persistence (BMP).
Session Bean is used to represent a workflow on behalf of a
client. There are two types: Stateless and Stateful.
Stateless bean is the simplest bean. It doesn't maintain any
conversational state with clients between method
invocations. Stateful bean maintains state between invocations.
 
Is This Answer Correct ?    18 Yes 4 No
Uppi
 
Answer
# 2
entity beans are generally used for database interaction
thus provide various EJB services like
transctions,persitence etc which using the seesion bean
will be manully handeled by the programmer while
interacting with Db,session beans are basically for
processing the logic not for DB entities
 
Is This Answer Correct ?    13 Yes 2 No
Tarunam Verma
 
 
 
Answer
# 3
An entity bean represents an entity such as an employer,
student, etc. A session bean is a type of EJB (Enterprise
JavaBean) that encapsulates the logic of a business process
and business rules. Entity beans offer the following
advantages over session beans:

Persistence: Entity beans are persistent, i.e., the state
of the bean exists beyond the lifetime of the application
or the application process. There are two types of
persistence: Bean-managed and Container-managed. In Bean-
managed persistence, the code contains the calls that
access the database. In Container-managed persistence, the
EJB container generates the database calls.
Shared Access: Multiple clients can share the entity beans.
It works within the transactions as the client changes the
data.
Primary Key: Each entity bean has a unique object
identifier that enables the client to locate a particular
entity bean.
Relationship: An entity bean can relate to other entity
beans. Both CMP and BMP can be used to maintain
relationships.
 
Is This Answer Correct ?    1 Yes 4 No
Gaurav
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
Can you run the product development on all operating systems ?   1
whats the life cycle of jsp Satyam 2
what is the difference between HashMap and Hashtable Value-Labs 17
Name the method that used to clear the buffer ?   2
what is object type casting? give some example with related? HP 2
Can we iterate through collection using for loop? Rolta 2
What code optimizations techniques you follow in general practice? Accenture 2
what is platform dependent translation and platform dependent programming language   2
how can i kill thread without stop() and destroy()   1
What is static binding and where it occurs?   4
wht is mean by dirty read?   1
what is the replacement for GOTO in java? CTS 2
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com