What are the different types of EJB?
Mainly three types of EJB:
- Entity Bean
- Session Bean
- Message Driven Bean(MDB)
(1) Entity Bean: It represents an entity which is mapped with database or we can say it makes OR object Relational mapping with Database. Entity bean typically represent table in RDBMS and each instance represent row in the table.
Two types of entity bean:
- CMP Entity bean: Container managed entity bean its responsibility of container to manage the bean persistence behavior.
- BMP Entity bean: Programmer manage the bean persistence behavior.
Types of session bean:
- Stateless session bean: When there is not need to maintain state of a particular client stateless session bean is used .They alive for short period of time. For example if we are validating the credit card we can use stateless session bean.
- Stateful session bean: Stateful session bean maintain the conversational state of client over the series of method call before the bean instance goes to passive state conversational state is saved to persistence area like Hard disk and again when same client send a request and bean instance come into the active state it will come out from hard disk to main memory. For Example when we do online banking transaction ,online reservation we use stateful session bean.
Guardar para repaso
Guardar para repaso
Guarda este elemento en marcadores, marcalo como dificil o agregalo a un conjunto de repaso.
Inicia sesion para guardar marcadores, preguntas dificiles y conjuntos de repaso.