Using the IMS Connect-managed conversation state programming model

To specify to have IMS Connect manage all iterations in a conversation, the useConvID property of the IMSInteractionSpec class must be set to false.

About this task

To enable your Java client for IMS conversational transactions by using the IMS Connect-managed conversation state programming model:

Procedure

  1. Obtain a connection handle from the IMSConnectionFactory. This connection handle must be used by all subsequent iterations for the conversation. If your Java™ application is a Web application, you might have to save the connection handle in the HTTP Session object for the connection handle to be retrieved and used on subsequent iterations in the same browser.
  2. Set the IMSInteractionSpec useConvID property to false (the default value is false) in the first iteration. Do not change the value of this property in subsequent iterations of the conversation. If the useConvID property changes during a conversation, an error would occur.
  3. Set the IMSInteractionSpec commitMode property to 1. Set an appropriate value for the syncLevel property.
  4. If the client application controls the ending of a conversation, on the last iteration, set the IMSInteractionSpec interactionVerb property to SYNC_END_CONVERSATION.
  5. Close the connection handle at the end of the conversation.