Throttling of inbound message flow for JCA 1.5 message-driven beans

This topic describes how to throttle message delivery for message-driven beans (MDB) which are deployed as message endpoints for J2EE Connector Architecture (JCA) V1.5 inbound resource adapters.

 

Overview

For installations that use resource adapters that implement the J2EE Connector Architecture (JCA) V1.5 message delivery support, the WebSphere Application Server provides message throttling support to control the delivery of messages to endpoint message-driven beans (MDB). Use this support to avoid overloading the server with a flood of inbound messages, except in the following two cases:

  • The default messaging provider (the SIB JMS Resource Adapter) uses a special type of message throttling. You should not use the JCA 1.5 throttling of messages, described in this topic, for message-driven beans that you have deployed as JCA 1.5 resources on the default messaging provider. We can leave the message-driven bean pools to the default size of 500. For more information about the message throttling support of the default messaging provider (the SIB JMS Resource Adapter), see the related tasks.

  • If you want to throttle message delivery for a message-driven bean deployed on a JMS provider that does not have a JCA 1.5 resource adapter (such as the V5 Default Messaging and WebSphere MQ) one can configure message throttling support as described in the related tasks.

Message delivery is throttled on an message-driven bean basis by limiting the maximum number of endpoint instances that can be created by the adapter that the MDB is bound to. When the adapter attempts to create an endpoint instance, a proxy for the MDB instance is created and returned as allowed by the JCA 1.5 architecture. There is a one-to-one correspondence between proxies and MDB instances, and like the MDB instances, the proxies are pooled based on the minimum and maximum pool size values associated with the message-driven bean. Throttling is performed through the management of the proxy pool.

At the time the adapter attempts to create an endpoint, if the number of endpoint proxies currently created is equal to the maximum size of the pool, adapter createEndPoint processing returns an Unavailable Exception. When this happens, the adapter is not allowed to issue any more createEndPoint() requests until it has released at least one endpoint back to the server for reuse. Installations can thus control the throttling of message delivery to a JCA 1.5 MDB based on the setting of the maximum size of the pool associated with each JCA 1.5 message-driven bean.

We can specify the poolsize by using the com.ibm.websphere.ejbcontainer.poolsize jvm System property to define the minimum and maximum poolsize of stateless, message-driven, and entity beans. In the case of an message-driven bean that supports JCA 1.5, the maximum poolsize value specified limits how many message endpoint instances can be created for that message-driven bean. For example, if the installation sets the maximum size of a JCA 1.5 MDB pool to 5, then at most 5 messages can be concurrently delivered to 5 instances of the message-driven bean. This property can be specified using command-line scripting (see EJB container system properties) or by specifying it under the Administrative Console as an environmental variable.

 

Procedure

  1. Open the administrative console.

  2. Select Servers.

  3. Select Application Servers.

  4. Select the server you want to configure.

  5. Under Server Infrastructure, expand Java and Process Management.

  6. Select Process Definition.

  7. SelectServant.

  8. Under Additional Properties, select Java Virtual Machine.

  9. Under Additional Properties, select Custom Properties.

  10. Select New. A panel with three General Properties fields appears. This is where you set the property.

  11. In the Name field, enter com.ibm.websphere.ejbcontainer.poolsize.

  12. To fill in the Value field, refer to EJB container system properties for possible values.

  13. After defining the value of the property, select OK. You are now prompted to save the changes you have just made.

  14. Select Save.


 

Related Tasks


Configuring MDB throttling for the default messaging provider