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

How to increase ejb transaction timeout in weblogic?

551


What is @autowired required false?

589


What does it mean to be stateless?

535


can u explain about design patterns like singleton,builder,factory

1897


Differentiate “find a method” from “select method” in EJB ?

532






How many types of session beans are available in ejb?

527


Differentiate Conversational from Non-conversational interactions?

550


What is ejb in spring?

449


What is the purpose of ejb in java?

541


How can I access ejb from asp?

591


When was ejb developed?

574


Differentiate Phantom from Un-repeatable?

567


What are the components of ejb?

568


What is stateful session bean?

570


Enlist the contents of Container.

586