Interview Question: What is the difference between find and select methods in EJB?

By: Ash Viewed: 170 times  Printer Friendly Format    


Question:What is the difference between find and select methods in EJB?

Answer:

A select method can return a persistent field (or a collection thereof) of a related entity bean. A finder method can return only a local or remote interface (or a collection of interfaces).

Because it is not exposed in any of the local or remote interfaces, a select method cannot be invoked by a client. It can be invoked only by the methods implemented within the entity bean class. A select method is usually invoked by either a business or a home method.

A select method is defined in the entity bean class. For bean-managed persistence, a finder method is defined in the entity bean class, but for container-managed persistence it is not.

 

 

 

 


Most Viewed Articles (in Interview )

What is the difference between JTS and JTA?

Interview Question: What is Action Class?

Interview Question: What is the difference between EAR, JAR and WAR file?

Tell me something about J2EE component?

What is Deployment Descriptor?

Explain garbage collection?

What is the difference between jsp:include page and @ include file?

Interview Question: What is ActionForm?

Interview Question: What about JSTL and JavaServer Faces ?

Interview Question: Why are some of the class and element names counter-intuitive?

Interview Question: What is the difference between ejbCreate() and ejbPostCreate?

Interview Question: What is the difference between Message Driven Beans and Stateless Session beans?

What are the services provided by a container?

What is Collection API?

What is similarities/difference between an Abstract class and Interface?

Latest Articles (in Interview)

Comment on this tutorial