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

By: Ash 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.

 

 

 

 

Ask a Question



Most Viewed Articles (in Interview )

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

Can Entity Beans have no create() methods?

What types of comments are available in the JSP?

Interview Question: What is Struts?

Interview Question: How is the MVC design pattern used in Struts framework?

Interview Question: If the framework doesn't do what I want, can I request that a feature be added?

Interview Question: Do ActionForms have to be true JavaBeans?

Interview Question: What is the difference between sessioncontext and entitycontext?

Interview Question: What is re-entrant. Is session beans reentrant. Is entity beans reentrant?

Interview Question: What is deployment descriptor?

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

What do you understand by a J2EE module?

What are the services provided by a container?

What are types of J2EE clients?

What is J2EE Connector architecture?

Latest Articles (in Interview)

Comment on this tutorial