Previous Topic: Excluding from Interception and VirtualizationNext Topic: Example: Auto-Response Generation for EJB Calls


Java Agent Auto-Response Generation

You can use the DevTest Java Agent to record transactions even when the back-end is not available.

To configure this feature, add the respond directive to the rules.xml file. The respond directive has the following format:

<respond class="class_or_interface_name" method="method_name" signature="signature" source="string_value" args="string_value" return="class_name"/>

The respond directive must be placed within the agent element of the rules.xml file.

The class attribute is the only required attribute.

Use the following attributes to specify the method or methods that you want to the agent to intercept:

When the agent intercepts a method call that matches the specification, the agent performs the following actions:

You can use the return attribute to specify the object type, thus overriding the first action.

If a value contains a less than sign, replace the less than sign with the following text:

&lt;

If a value contains a greater than sign, replace the greater than sign with the following text:

&gt;