Java EJB Programming Question:

Download Job Interview Questions and Answers PDF

What is the difference between session and entity beans? When should I use one or the other?

Java EJB Programming Interview Question
Java EJB Programming Interview Question

Answer:

An entity bean represents persistent global data from the database; a session bean represents transient user-specific data that will die when the user disconnects (ends his session). Generally, the session beans implement business methods (e.g. Bank.transferFunds) that call entity beans (e.g. Account.deposit, Account.withdraw)

Download Java EJB Programming Interview Questions And Answers PDF

Previous QuestionNext Question
What is EJB?What is the default transaction attribute for an EJB?