WebLogic Workshop introduces the notion of conversations to manage the state of your web service (stored in class member variables) over a long-running sequence of operations and correlate messages between your web service and its clients and controls. To use conversations, you simply set the conversation property on each method or callback, marking it as starting, continuing, or finishing a conversation. When a start method is called, WebLogic Server creates a new record (a conversation instance) for the state of the web service. When continue methods or callbacks are called, the state of the conversation is accessible. After a finish method or callback completes, the conversation state is deleted to release server resources.
To Specify the Conversational Behavior of a Web Service
To Specify Conversation Lifetime
Conversations represent server resources and should be released whenever possible. In addition to marking methods of a conversation to control how they affect conversation phase, you can also configure the maximum lifetime or idle time of a conversation. These properties will cause the conversation to be released after a specified period even if (or because) none of the conversational methods have been called. To specify conversation lifetime:
To Make Asynchronous Methods and Callbacks
If you expect that your web service will handle high-volume loads, you should consider using asynchronous methods and callbacks. When a client calls an asynchronous method of your web service, the request is buffered and the method invocation returns to the client immediately. This prevents the client from waiting until your web service handles the request. When the web service sends a message to a client through an asynchronous callback, this outgoing message is buffered on the local machine and the callback invocation returns immediately. This prevents your service from having to wait while the message is sent and the response is received from the client.
You can only add asynchrony to methods and callback whose parameters are serializable and whose return type is void. To make an asynchronous method or callback: