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

Controlling WS-ReliableMessaging sequences programmatically

Your client application can take programmatic control of WS-ReliableMessaging sequences. This helps manage resources on the server, for example by removing sequences after a client application has finished messaging. You can add code to create sequences, send acknowledgement requests, close sequences, terminate sequences and wait until sequences are complete.

About this task

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.

For your client application to gain programmatic control over reliable messaging sequences, it needs access to a WSRMSequenceManager instance. Use the following code fragment to achieve this:

import com.ibm.wsspi.wsrm.WSRMSequenceManager; 
import com.ibm.wsspi.wsrm.WSRMSequenceManagerFactory;

.........

     // Get the factory
     WSRMSequenceManagerFactory factory = WSRMSequenceManagerFactory
         .getInstance();

     // Get the sequence manager instance
     WSRMSequenceManager sequenceManager = factory.createWSRMSequenceManager();
All WSRMSequenceManager methods take the following parameters:
  • The client instance object. This is either a Dispatch client instance, or the Dynamic proxy client. For details of the client types, see JAX-WS client programming model.
  • 2) The Port QName instance for the target endpoint.

To control WS-ReliableMessaging sequences programmatically, add code to your client application as described in the following steps:

Procedure




In this information ...


IBM Redbooks, demos, education, and more


Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

IBM Suggests
Task 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/twbs_wsrm_prog_seq.html