Explain the difference between, Java Class and Bean?

Answer Posted / john

A Java class is meant to carry out the different database
operations like retrtieveing data, inserting data and
updating data.

The EJB has the business logic within it. the EJB decides
what the business requires and carries out different
transactions. It makes use of the Java class to interact
with the database.

The Java Bean is simple java class which is contains Getters
and Setters. They are just meant to modify the values of the
variables. They neither contain any business logic nor do
they interact with the database.

Generaly a Java Class would retrieve some data and this data
is assigned to variables using the Setter method of the Java
Bean. If we want to retrieve the value of the cariable again
we use a Getter method

Is This Answer Correct ?    22 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ptp model?

788


A client wants to preserve the reference to the ejbhome object of an enterprise bean instance and use it later. Which of the following can be serialized for this purpose?

767


Which services are provided to ejb components by the ejb container?

950


What is mdb in ejb?

720


What do you understand by session facade?

773


how can u integrate ejb and hibernate? How can u call hibernateDAO methods in session bean?

2719


Elucidate callback in ejb?

775


What are the components of session beam?

854


What are the various types of entity beam?

814


How entity beans support container managed persistence?

2193


What is the full form of ejb in java?

750


What is a local interface?

799


What is meant by ejb?

738


What are the benefits of ejb?

784


Can an ejb send asynchronous notifications to its clients?

768