Show Table of Contents
30.3. MDB and Consumer pool size
Most application servers, including JBoss, allow you to configure how many MDBs there are in a pool. It is important to understand that the
MaxPoolSize parameter in the ejb3-interceptors-aop.xml file will not have an effect on how many sessions or consumers are created because the Resource Adaptor implementation is not aware of the application server MDB implementation.
For example, if you set the MDB
MaxPoolSize to 1, 15 sessions or consumers are created (15 is the default). To limit how many sessions or consumers are created, set the maxSession parameter on the resource adapter, or through an ActivationConfigProperty annotation on the MDB.
@MessageDriven(name = "MDBMessageSendTxExample",
activationConfig =
{
@ActivationConfigProperty
(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty
(propertyName = "destination", propertyValue = "queue/testQueue"),
@ActivationConfigProperty
(propertyName = "maxSession", propertyValue = "1")
})
@TransactionManagement(value= TransactionManagementType.CONTAINER)
@TransactionAttribute(value= TransactionAttributeType.REQUIRED)
public class MyMDB implements MessageListener
{ ....}

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.