22 Configuring Message Buffering for Web Services
Parent topic: Developing Advanced Features of JAX-WS Web Services
Overview of Message Buffering
When an operation on a buffered web service is invoked, the message representing that invocation is stored in a JMS queue. WebLogic Server processes this buffered message asynchronously. If WebLogic Server goes down while the message is still in the queue, it will be processed as soon as WebLogic Server is restarted.
WebLogic Server then processes the request message on a separate thread obtained from a pre-configured and managed pool of threads. This allows WebLogic Server to absorb spikes in client load, and continue to process the requests in an orderly fashion over a period of time. Message buffering is a powerful tool to avoid denial of service attacks and general overload conditions on the server.
To assist you in determining whether to configure message buffering on the web service, it is recommended that you review Failure Scenarios with Non-buffered Reliable Web Services.
Parent topic: Configuring Message Buffering for Web Services
Configuring Messaging Buffering
You can configure message buffering for web services at the WebLogic Server or web service endpoint levels. The message buffering configured at the server level defines the default message buffering defined for all web services and clients running on that server, unless explicitly overridden at the web service endpoint level.
When you configure message buffering at the web service endpoint level, select Customize Buffering Configuration to indicate that you want to customize the buffering configuration defined in the web service descriptor or deployment plan at the web service endpoint level. If not checked, the buffering configuration specified at the WebLogic Server level is used.
Alternatively, you can use WLST to configure message buffering. For information about using WLST to extend the domain, see Configuring Existing Domains in Understanding the WebLogic Scripting Tool.
The following sections describe message buffering configuration properties:
- Configuring the Request Queue
- Configuring the Response Queue
- Configuring Message Retry Count and Delay
Parent topic: Configuring Message Buffering for Web Services
Configuring the Request Queue
The following table summarizes the properties used to configure the request queue.
Table 22-1 Configuring the Request Queue
Property | Description |
---|---|
Request Queue Enabled |
Flag that specifies whether the request queue is enabled. By default, the request queue is disabled. The request queue name is defined by the logical store enabled at this level. When using a WebLogic Server persistent store as the physical store for a logical store, the names of the request and response buffering queues are taken from the logical store configuration and not the buffering configuration. |
Request Queue Connection Factory JNDI Name |
JNDI name of the connection factory to use for request message buffering. This value defaults to the default JMS connection factory defined by the server. |
Request Queue Transaction Enabled |
Flag that specifies whether transactions should be used when storing and retrieving messages from the request buffering queue. This flag defaults to false. |
Parent topic: Configuring Messaging Buffering
Configuring the Response Queue
The following table summarizes the properties used to configure the response queue.
Table 22-2 Configuring the Response Queue
Property | Description |
---|---|
Response Queue Enabled |
Flag that specifies whether the response queue is enabled. By default, the response queue is disabled. The response queue name is defined by the logical store enabled at this level. When using a WebLogic Server persistent store as the physical store for a logical store, the names of the request and response buffering queues are taken from the logical store configuration and not the buffering configuration. |
Response Queue Connection Factory JNDI Name |
JNDI name of the connection factory to use for response message buffering. This value defaults to the default JMS connection factory defined by the server. |
Response Queue Transaction Enabled |
Flag that specifies whether transactions should be used when storing and retrieving messages from the response buffering queue. This flag defaults to false. |
Parent topic: Configuring Messaging Buffering
Configuring Message Retry Count and Delay
The following table summarizes the properties used to configure the message retry count and delay.
Table 22-3 Configuring Message Retry Count and Delay
Property | Description |
---|---|
Retry Count |
Number of times that the JMS queue on the invoked WebLogic Server instance attempts to deliver the message to the web service implementation until the operation is successfully invoked. This value defaults to 3. |
Retry Delay |
Amount of time between retries of a buffered request and response. Note, this value is only applicable when RetryCount is greater than 0. The value specified must be a positive value and conform to the XML schema duration lexical format, |
Parent topic: Configuring Messaging Buffering