Arch objective :
Comparing Session and Entity Beans Although both session and entity beans run in an
EJB container, they are quite different. The following table contrasts session and entity beans:
Purpose SB : Performs a task for a client.
EB : Represents a business entity object that exists in persistent storage.
Shared Access SB : May have one client.
EB : May be shared by multiple clients.
Persistence SB : Not persistent. When the client terminates its session bean is no longer available.
EB : Persistent. Even when the EJB container terminates, the entity state remains in a database.