- MDB class must directly (using implements keyword) or indirectly (using annotation or descriptors) implement a message listener interface. Example,
- It is a POJO class and marked with @MessageDriven annotation
- The MDB class must be declared as public.
- The class cannot be either final or abstract.
- The class must have no-argument constructor. Container uses this constructor to create MDB instance.
- You must implement the methods defined in message listener interface. The methods must be public and cannot be static or final.
- You must not throw javax.rmi.RemoteException or any runtime exception. If a RuntimeException is thrown then the MDB instance is terminated.
Programming rules for creating MDB2016-10-182016-10-19https://ibytecode.com/ibcjupiter/wp-content/uploads/2024/04/logo-full-small.pngiByteCode Technologieshttps://ibytecode.com/ibcjupiter/wp-content/uploads/2016/10/java-ee.png200px200px