# @jws:conversation Annotation

The @jws:conversation annotation specifies the role that an individual method or callback plays in a service's conversations. Note that these roles are different between methods and callbacks.

Note: The Web Service control uses the @jc:conversation annotation instead of the @jws:conversation annotation. The functionality is the same.

## 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, because a callback is necessarily part of a conversation, although it cannot start a conversation.

## Remarks

The @jws:conversation annotation sets the conversation phase attribute for a method or callback to specify its role in the service's conversations.

The following rules apply to this annotation's use:

- Only one @jws:conversation annotation can appear within a single Javadoc comment block.
- Optionally the @jws:conversation annotation may appear in front of an @common: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 via 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.

Related Topics

Overview: Conversations

JwsContext Interface