Message-Driven Beans and Concurrency

Like other EJB components, the EJB container handles concurrency for message-driven bean instances. Message-driven EJBs are not written with thread-safe code, and the EJB container never makes a re-entrant call into a bean instance. As with stateless session beans, message-driven bean instances are pooled in memory by the container. The weblogic-ejb-jar.xml deployment descriptor contains two parameters to control the pool size: <initial-beans-in-freepool> and <max-beans-in-freepool>. When the EJB is deployed, the container pre-allocates as many instances as specified in the initial-beans-in-freepool parameter. As messages arrive, this enables the server immediately to accept work without spending time creating ...

Get J2EE™ Applications and BEA™ WebLogic Server™ 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.