Message-Driven Beans Best Practices

Just like a Session bean is a façade for the synchronous invocation of business logic, a Message-Driven bean is a façade for asynchronous business logic. Another design pattern is Service Activator. According to the EJB 2.0 specification, Session beans and Entity beans are synchronous, but there are situations in which asynchronous invocations are desirable. Message-Driven beans can naturally serve as service activators. Whenever a client needs an asynchronous service, a JMS message is posted, and the corresponding MDB interprets the request, locates the service, and subsequently invokes it.

In the beginning of this chapter, we used an example to demonstrate the necessity of asynchronous processing use cases. ...

Get BEA WebLogic Server™ 8.1 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.