@jws:reliable Annotation

The @jws:reliable annotation specifies that a web service should use reliable messaging, and specifies how long messages must be retained by the server in order to perform detection and removal of duplicates. Once you have specified that the web service should use reliable messaging, you can then enable or disable it for a given method.

Syntax

@jws:reliable

message-time-to-live="duration"

enable="true | false"

Attributes

message-time-to-live

Required. Set for the web service. Specifies how long messages are maintained on the server, in order to detect duplicate messages. The default is 0.

enable

Optional. Set for a method of the web service. Specifies that reliable messaging should be enabled for messages that are received from the client by this method. The default is false.

Remarks

When you enable reliable messaging for a web service, you specify how long the message should be tracked on the server by setting the message-time-to-live attribute. Once the specified interval has passed, the server no longer tracks the message. The client must specify a message time-to-live that is less than or equal to the web service setting.

The message-time-to-live attribute takes a duration as its value. Assign values in the form of expressions of time: 2 minutes, 5 days, and so on. Note that you cannot enable reliable messaging for an operation until you have set the message-time-to-live for the web service.

Reliable messaging is supported only using SOAP over HTTP. The operation for which reliable messaging is enabled cannot support any other protocols. By default, a web service method supports SOAP over HTTP (http-soap), HTTP Form GET (form-get), and HTTP Form POST (form-post). To use reliable messaging for a given operation, you must modify that operation's @jws:protocol annotation so that it supports only http-soap.

A method that uses reliable messaging must return void.

The following example shows a method that has reliable messaging enabled:

/**
 * @common:operation
 * @jws:protocol http-soap="true" form-get="false" form-post="false"
 * @jws:reliable enable="true"
 */
public void usesReliableMessaging()
{
  ...
}

Limitations in This Release

Reliable messaging has the following limitations in WebLogic Workshop 8.1:

Related Topics

Protocols and Message Formats