What exactly is Message Driven Bean (MDB)
- From the perspective of Java artefact, it is an EJB specified by EJB 2.1. It is a stateless session bean.
- It is a consumer in terms of the messaging programming model.
- It implements javax.ejb.MessageDrivenBean (container life-cycle management).
- It implements javax.jms.MessageListener interface.
- It implements ejbCreate() method.
- The EJB container maintains a pool of method-ready MDB.
- When a message comes, the container selects a MDB from the pool to process the message.
- The container removes an MDB by invoking ejbRemove() method.
- The transaction can be container managed or bean managed.
- To associate an MDB with destination on SIB, use JMS activation specification.
- To associate an MDB with a destination on MQ, use listener port.
No comments:
Post a Comment