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
Explain ejbhome and ejbobject in ejb?
How many ejb objects are created for a bean?
Name the attributes of javax.ejb.ejb.
What is activemq used for?
Define Context?
What are the components of ejb?
How do you decide whether you should use session, entity or message driven bean?
Enlist the contents of Container.
How do I use a less than or greater than on a message selector in ejb-jar.xml?
What’s new in the ejb 2.0 specification?
What is ejb home object?
Explain the important elements of ejb?
What are the design principles for ejb?
What is stateless session?
What does @singleton annotation do?