Recording JMS by using Subscribe/Browse
If you are testing a Java™ application that uses the Java™ Message Service (JMS) interface, you can use Rational® Integration Tester to record publication operations.
About this task
In Recording Studio, you can save the recorded events as a test, stub, or other project resource by using the Recorded Events wizard.
Generic JMS topics can be recorded by using the topic that is configured within the operation.
TIBCO EMS queues are the only JMS queues that can be recorded. If you attempt to record any
other JMS queues, an error message is
displayed:
Unable to monitor reply destination as it appears to be a queue implementation that cannot be non-destructively read from. Consider using the java agent to enable this interaction to be recorded.
For
TIBCO EMS, if security is enabled on the EMS server, a valid JNDI user name and password are
required (in the configuration of the physical TIBCO EMS Broker) to monitor events. For more
information see Recording WebSphere MQ and TIBCO EMS Server events.For an alternative method of recording these types of queues, see Recording JMS by using the Client Agent.
Procedure
- Prepare
Rational® Integration
Tester
- In Library Manager, ensure that the Java™ client libraries from the JMS provider are configured correctly. By completing these steps Rational® Integration Tester can communicate with a physical JMS server.
- In the Architecture School perspective, open the Logical view and then create a JMS topic, queue or destination domain, as appropriate.
- Create an operation and bind it to the JMS domain transport. Specify the queue or topic under JMS Headers in Message Exchange Pattern on the operation as defined in the Logical View of Architecture School.
- In the Physical View of the Architecture School, create a physical JMS Broker.
- Bind the logical and physical resources in a new or current environment. For more information, see Creating a Java Message Service (JMS) broker.
- While you are still in the Physical View, configure the JMS transport. For more information, see Recording and stubbing settings. For the recording mode, select Subscribe/Browse.
- Import schemas so that Rational® Integration Tester can apply them to the recorded messages. For information on adding schema for JMS Java™ object messages, see Adding Java object schemas. A schema is not required for a JMS Map message, as it has a known format.
- Record the application
- In Rational® Integration Tester, open the Recording Studio perspective.
- Create a recording monitor for the operation associated with the logical JMS domain.
- Start a recording session: from the toolbar of the Events View window, click the Start Recording () icon.
- Wait for recorded events. Depending on the Java™ application that you are testing, you might have to use the application to generate events.
- Stop the recording session: from the toolbar of the Events View window, click the Pause recording () icon.