Buffer.jws Sample

A web service that demonstrates the @common:message-buffer tag to queue high-traffic requests. The sample uses a Timer control to delay sending a response back to the client, simulating waiting for a slow back-end service to respond to requests from this web service. The start method is buffered, allowing clients to continue processing immediately after submitting a request.

Note: In previous releases, the @common:message-buffer tag was known as the @jws:message-buffer tag. This tag is still supported for backward compatibility.

Concepts Demonstrated by this Sample

Location of Sample Files

This sample is located in the async folder of the WebServices project in the SamplesApp sample application. In the file system the location is:

BEA_HOME\weblogic81\samples\workshop\SamplesApp\WebServices\async\Buffer.jws

To Run the Sample

  1. Start WebLogic Server in the appropriate domain.
  2. Launch the service either by opening it in WebLogic Workshop and selecting the Start operation or by entering http://localhost:7001/WebServices/async/Buffer.jws in the address bar of your browser. If WebLogic Server is running in the appropriate domain on this machine and you have deployed the SamplesApp sample application, you may click here to run the sample.
  3. Navigate to the Test Form tab of Test View, if necessary.
  4. Invoke the startBufferAsync method to create a new conversational instance and invoke the operation on the simulated legacy system.
  5. After the artificial delay, Buffer will invoke the BufferResult callback.
  6. Refresh the browser periodically until the callback.BufferResult entry appears in the Message Log.
  7. Select log entries in the Message Log to see the message traffic involved in each interaction.

Related Topics

Using WebLogic Built-In Controls

Timer Control

Designing Asyncronous Interfaces

JwsContext Interface

Conversation.jws Sample

Test View