Previous Topic: Standard JMSNext Topic: JDBC


Java

The DevTest Java Agent is required to record Java service images. In the LISA Bank application, the agent is installed by default. For any other application, install the agent and start the registry.

For testing, start the demo server, where the agent is installed, or run the LISA Bank application. For running with any other Java application, configure the agent. For more information about the agent, see Agents.

When using multiple recorders in the same workstation to record multiple EJB remote calls concurrently from different classes, the service image and VSM created by each recorder display an aggregated list of classes.

Follow these steps:

  1. To start recording a new virtual service image, complete one of the following steps:

    The Virtual Service Image Recorder opens.

  2. Select Java as the transport protocol on the Basics tab.
  3. Click Next.

    The Select Java classes to virtualize window opens.

  4. To move selected agents between the following columns, use the provided arrows:
    Available Online Agents

    Lists the online agents that are available to be connected.

    Connected Agents

    Lists contains the online or offline agents that are connected for the virtual service model. The offline agents display in a gray italic font. You can select the agents from the Available Online Agents list.

    When you select an agent from either list, the host name and the main class appear.

  5. To add an agent that is not in the list, type the agent name in the field above the list of connected agents and click Add Agent LISA--icon_image_whiteplussignbluecircle.

    This mechanism is provided for adding any offline agents that were not previously in the connected list. The agent name cannot be empty or already present in the connected agents list. If the agent name entered is present in the online agents list, it is moved from the available online agents to the connected agents list.

  6. To select a class by searching, complete the following steps:
    1. Double-click Search for Classes.
    2. Type a search string as a fully qualified name (including the package), using regular expressions.
    3. Click the search icon.
    4. Select a class. Some classes could show up more than once. Select a class only once.
    5. Click the right arrow.
  7. To select a class by manually entering the name, complete the following steps:
    1. Double-click Manually Enter a Class Name.
    2. Type the fully qualified class name.
    3. Click the right arrow.
  8. To select a class from a list of classes that the agent suggests, complete the following steps:
    1. Double-click Agent Suggestions.
    2. Click Retrieve Refresh icon.
    3. Select a class.
    4. Click the right arrow.
  9. To add a protocol to the recording, double-click Protocols and select the protocol to record.
  10. Shut down the system under test.
  11. Click Next.

    The Recording Has Begun page opens.

  12. Restart the system under test.

    Note: Shutting down and restarting the system under test is optional. Restarting helps to ensure that VSE captures any initial traffic that occurs when the system under test initializes.

    After the system under test starts, a list of the most recent transactions displays. To see the content of a selected transaction, double-click it.

  13. Click Next when the recording completes.

    The Data Protocols panel opens with appropriate data protocols prepopulated. You can change or add data protocols. There may be additional panels to configure the data protocols. For more information about configuring data protocols, see Using Data Protocols.

  14. When you have configured the data protocols, click Next.

    While it prepared to write the .vsi file, the recorder verifies request and response bodies to ensure that (if they are marked as text) they are text. If they are not text, the type is switched to binary.

    Note: To save the settings on this recording to load into another service image recording, click Save Image of the Save icon above the Finish button.

  15. Click Finish.