O'Reilly logo

Special Edition Using Java™ 2 Enterprise Edition by Mark Wutka

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

Message-Driven Beans

Version 2.0 of the EJB specification introduced a new kind of EJB: the message-driven bean. Unlike entity or session beans, message-driven beans don't have a public interface. The only way you can communicate with message-driven beans is via messages.

Message-driven beans are much easier to write than either session beans or entity beans. You must still write ejbCreate and ejbRemove to initialize the bean and clean up when you're done. You must also implement ejbActivate and ejbPassivate just because they're required by the EJB specification, but they are not a part of the message-driven bean lifecycle. Be cause message-driven beans have no public interface, they have no Home or Remote interfaces.

You must implement the ...

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