A message-driven bean is an enterprise bean that allows Java™ EE applications to process messages asynchronously. It acts as a Java Message Service (JMS) message listener, which is similar to an event listener except that it receives messages instead of events. The messages may be sent by any Java EE component - an application client, another enterprise bean, or a Web component - or by a JMS application or system that does not use Java EE technology.
In JMS, a message is a Java object with two parts: a header and a body. The header is composed of delivery information and metadata. The message body carries the application data, which can take several forms: text, serializable objects, byte streams, etc. The JMS API defines several message types (TextMessage, MapMessage, ObjectMessage, and others) and provides methods for delivering messages to and receiving messages from other applications.