Multiple choice technology architecture

Which of the following offers an accurate description of Message-Driven Enterprise Beans?

  1. Message-Driven beans are just a new way of describing a JMS message. This has been formalized with the EJB 2.0 specification.

  2. A Message-Driven bean is an enterprise bean that allows J2EE applications to process messages asynchronously.

  3. A Message-Driven bean is an enterprise bean that allows J2EE applications to process messages synchronously.

  4. A Message-Driven bean is used when you need to interact with messaging systems other than JMS.

  5. A Message-Driven bean is like a Session Bean except that if the server is busy it will put the Message-Driven beans' method requests in a queue and execute them one at a time to reduce the load on the Application Server.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Message-Driven Beans (MDBs) are designed to process JMS messages asynchronously, allowing the EJB container to handle message consumption and bean invocation independently of client requests. This asynchronous processing is their defining characteristic. Option C incorrectly states they process messages synchronously. Option A is wrong because MDBs are enterprise beans, not just a way to describe JMS messages. Option D is incorrect because MDBs specifically work with JMS. Option E describes queue behavior which is not their primary purpose.