Programming Tutorials

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

By: Ash in Interview Tutorials on 2008-08-13  

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.

 

 

 

 





Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in Interview )

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

Getting started with Interview

Interview Question: Can I invoke Runtime.gc() in an EJB?

Interview Question: What are the optional clauses in EJB QL?

Interview Question: Why does EJB needs two interfaces(Home and Remote Interface)?

Explain the user defined Exceptions?

Interview Question: What is difference between EJB 1.1 and EJB 2.0?

Interview Question: Is Decorator an EJB design pattern?

How to define an Interface?

Is Iterator a Class or Interface? What is its use?

Interview Question: What are the call back methods in Entity bean?

Interview Question: What is abstract schema?

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

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

What is J2EE Connector architecture?

Latest Articles (in Interview)