Defining a Send Timeout on Connection Factories

Tuning WebLogic JMS 14-9 The Quota parameter of a destination defines which quota resource is used to enforce quota for the destination. This value is dynamic, so it can be changed at any time. However, if there are unsatisfied requests for quota when the quota resource is changed, then those requests will fail with a javax.jms.ResourceAllocationException .

14.7.3 JMS Server-Level Quota

In some cases, there will be destinations that do not configure quotas. JMS Server quotas allow JMS servers to limit the resources used by these quota-less destinations. All destinations that do not explicitly set a value for the Quota attribute share the quota of the JMS server where they are deployed. The behavior is exactly the same as if there were a special Quota resource defined for each JMS server with the Shared parameter enabled. The interfaces for the JMS server quota are unchanged from prior releases. The JMS server quota is entirely controlled using methods on the JMSServerMBean. The quota policy for the JMS server quota is set by the Blocking Send Policy parameter on a JMS server, as explained in Section 14.8.2, Specifying a Blocking Send Policy on JMS Servers . It behaves just like the Policy setting of any other quota.

14.8 Blocking Senders During Quota Conditions

■ Section 14.8.1, Defining a Send Timeout on Connection Factories ■ Section 14.8.2, Specifying a Blocking Send Policy on JMS Servers

14.8.1 Defining a Send Timeout on Connection Factories

Blocking producers during quota conditions by defining a send timeout can dramatically improve the performance of applications and benchmarks that continuously retry message sends on quota failures. The Send Timeout feature provides more control over message send operations by giving message produces the option of waiting a specified length of time until space becomes available on a destination. For example, if a producer makes a request and there is insufficient space, then the producer is blocked until space becomes available, or the operation times out. See Section 14.13, Controlling the Flow of Messages on JMS Servers and Destinations for another method of flow control. To use the Administration Console to define how long a JMS connection factory will block message requests when a destination exceeds its maximum quota. 1. Follow the directions for navigating to the JMS Connection Factory: Configuration: Flow Control page in Configure message flow control in the Oracle WebLogic Server Administration Console Help. 2. In the Send Timeout field, enter the amount of time, in milliseconds, a sender will block messages when there is insufficient space on the message destination. Once the specified waiting period ends, one of the following results will occur: ■ If sufficient space becomes available before the timeout period ends, the operation continues. Note: Outstanding requests for quota will fail at such time that the quota resource is changed. This does not mean changes to the message and byte attributes for the quota resource, but when a destination switches to a different quota. 14-10 Performance and Tuning for Oracle WebLogic Server ■ If sufficient space does not become available before the timeout period ends, you receive a resource allocation exception. If you choose not to enable the blocking send policy by setting this value to 0, then you will receive a resource allocation exception whenever sufficient space is not available on the destination. For more information about the Send Timeout field, see JMS Connection Factory: Configuration: Flow Control in the Oracle WebLogic Server Administration Console Help. 3. Click Save.

14.8.2 Specifying a Blocking Send Policy on JMS Servers