EJB generally is used for the following reasons -
1. To extract the business logic from web tier and implement the
buginess logic in ejb.
2. EJB can also run on different system. So for big application
to reduce load buniness logic implementation code can be executed
in different system.
3. Since to run the EJB, develop needs an EJB container. So
these are following activities are managed by the EJB container
-
i. To handle resouce polling. Basically EJB container create EJB
instance and place in poll to ready when require it provides the
instance.
ii. Transaction management using @ContainerBeabManaged
annotation
iii. Threading
iv. concurency handleing
Thanks
aswini.de@gmail.com