O'Reilly logo

Sams Teach Yourself J2EE™ in 21 Days by Peter Roxburgh, Andy Longshaw, Debbie Law, Dan Haywood, Martin Bond

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

What Are Message-Driven Beans?

Message-driven beans are generally constructed to be message consumers, although they can, like any other EJB, also be used to create and send messages. A Message-driven bean lives entirely within the container, it has no security context of its own. When the bean is deployed, it is associated with a particular queue or topic, and is invoked by the container when a message arrives for that queue or topic.

The following are the features of a Message-driven bean:

  • It is anonymous; that is, it has no client visibility. No state is maintained for the client.

  • All instances of a particular Message-driven bean are equivalent.

  • The container can pool instances.

  • It does not have a local or remote interface.

  • It is invoked asynchronously ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required