Message-Driven Bean Features


Message-driven bean (MDB) components provide a bridge between JMS and EJB components by listening on JMS destinations and invoking EJB components. A number of WebLogic-specific features are available to improve the reliability and performance of MDB components :

  • The initial and maximum number of MDB instances can be controlled using the inital-beans-in-free-pool and max-beans-in-free-pool parameters in weblogic-ejb-jar.xml . Limiting the number of instances provides a mechanism to throttle the processing of incoming JMS messages to be consistent with the number of JDBC connections or other resources and the priority of JMS requests versus other synchronous requests . Limiting the pool to a single bean allows you to guarantee strict ordered processing of messages, as opposed to just ordered delivery, which always occurs. See Chapter 9 for more information about this topic and the additional configuration steps necessary to guarantee ordered redelivery of messages in the event of errors.

  • The MDB component may be configured to run as a particular principal, or user , using the run-as element in ejb-jar.xml combined with a run-as-principal element in weblogic-ejb-jar.xml . This principal will be used for all invocations of EJB components made in the MDB s onMessage() message-processing method.

  • WebLogic Server supports the inclusion of the message delivery in the container-managed transaction started during the invocation of onMessage() if the transaction attribute is Required in the ejb-jar.xml descriptor. MDB components may also use bean-managed transactions started in onMessage() and propagated to all EJB components invoked in the transaction, although the message delivery itself is then outside the scope of the bean-managed transaction.

  • WebLogic Server supports the clustering of JMS destinations and the migration of MDB components from failed servers to operational servers using administrative functions. MDB components may also be deployed across all servers in a cluster to provide high levels of performance and availability.

  • WebLogic Server permits MDB components to be deployed against third- party JMS providers while retaining proper container-managed transactional behaviors.

Chapter 9 will discuss WebLogic Server JMS and MDB features and best practices.




Mastering BEA WebLogic Server. Best Practices for Building and Deploying J2EE Applications
Mastering BEA WebLogic Server: Best Practices for Building and Deploying J2EE Applications
ISBN: 047128128X
EAN: 2147483647
Year: 2003
Pages: 125

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net