WebSphere Application Server Version 6.1 Feature Pack for Web Services
             Operating Systems: AIX, HP-UX, i5/OS, Linux, Solaris, Windows, z/OS

             Personalize the table of contents and search results
             New or updated topic for this feature pack

Example: Code for terminating a sequence

Your client application can take programmatic control of WS-ReliableMessaging sequences. Use these code fragments as guidance for coding your reliable messaging client application to terminate a sequence.

Before you begin

For your client application to gain programmatic control over reliable messaging sequences, it needs access to a WSRMSequenceManager instance. For information and example code explaining how to achieve this, see Controlling WS-ReliableMessaging sequences programmatically.

For a more complete specification of terminating a sequence, see the WS-ReliableMessaging: supported specifications and standards.

By closing sequences programmatically, you limit the number of open sequences a single client has to support in a single JVM at one time. This helps avoid the problem described in the following troubleshooting tip: A client receives an out of memory exception message when working with large numbers of open sequences.

Example

To terminate a WS-ReliableMessaging sequence use the following method on the WSRMSequenceManager:

  /**
   * Terminates Web services reliable messaging session from this application to 
   * the endpoint url specified.
   * 
   * Throws a WSRMSequenceTerminatedException when the session between this application
   * and the target endpoint has already been terminated.
   * 
   * Throws WSRMSequenceUnknownException exception when either reliable messaging is not engaged to 
   * the specified endpoint url or the sequence has previously been terminated and removed.
   * 
   * @param clientObject The JAX-WS Dispatch instance, or the Dynamic Proxy client instance. 
   * @param endPointUri The target endpoint url
   * @throws WSRMNotEnabledException 
   * 
   * @throws WSRMSequenceTerminatedException
   * @throws WSRMSequenceUnknownException
   */
  public void terminateSequence(Object clientObject, QName portQName, String endPointUri) throws WSRMNotEnabledException;




Related tasks
Learning about WS-ReliableMessaging
Controlling WS-ReliableMessaging sequences programmatically
Related reference
Example: Code for creating a sequence
Example: Code for sending an acknowledgement request
Example: Code for closing a sequence
Example: Code for waiting for a sequence to complete
Reference topic    

Terms of Use | Feedback

Last updated: Nov 25, 2008 2:35:59 AM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.wsfep.multiplatform.doc/info/ae/ae/rwbs_wsrm_prog_seq_term.html