@jws:conversation Tag

Specifies the role a method or callback plays in a service's conversations. Note that these roles are different between methods and callbacks.

# Syntax

    @jws:conversation
    	phase="none" | "start" | "continue" | "finish"

# Attributes

phase

One of four values indicating the method or callback's role in conversations. Note that only continue and finish are available for callbacks.

# Remarks

Set the conversation phase attribute for a method or callback to specify its role in the service's conversations.

The following rules apply to this tag's use:

- Only one @jws:conversation tag can appear within a single Javadoc comment block.

- Optionally may appear in front of an @jws:operation method in a JWS file.

Possible attribute values are as follows:

- "start" — May be applied to methods only. Specifies that a call to the method starts a new conversation. Each call will create a new conversation context and an accompanying unique conversation ID, save the service's state, and start its idle and age timer.

- "continue" — May be applied to methods and callbacks. Specifies that a call to this method or callback is part of a conversation in progress. WebLogic Server will attempt to use the incoming conversation ID to correlate each call to an existing conversation. Each call to a "continue" method will save the service's state and reset its idle timer.

Set the phase attribute to "continue" for any method or callback that is likely to be used for communication with a client in connection with an ongoing request. In particular, these are methods that are clearly intended to be called subsequent to the conversation's start and before its finish. These include requests for or responses with additional information, requests for progress or status, and so on.

- "finish" — May be applied to methods and callbacks. Specifies that a call to this method or callback finishes an existing conversation. A call will mark the conversation for destruction by WebLogic Server. At some point after a finish method returns successfully, all data associated with the conversation's context will be removed.

It is also possible to finish a conversation by calling the JwsContext interface finishConversation method. For more information, see Managing Conversation Lifetime.

- "none" — May be applied to methods only. Specifies that a call to this method does not participate in any conversation. Methods marked none should not attempt to access conversational state (member variables of the JWS class).

The phase attributes default values are as follows:

- When applied to methods, the phase attribute's default value is "none".

- When applied to callbacks, the phase attribute's default value is "continue".

Note: It is possible to create a conversational web service that supports a deadlock condition. If the web service has at least one non-buffered incoming method with conversational phase set to "continue" or "finish" and has at least one non-buffered outgoing callback, it is possible that the callback will be initiated at the same time as a client calls one of the incoming methods. This situation will result in deadlock, causing one or both of the transactions to time out and be rolled back. If you experience this problem, make either all incoming methods or all outgoing callbacks message-buffered. For more about message buffering, see Asynchronous Methods.

Related Topics

Overview: Conversations

JwsContext Interface