Split by POJO Method Call

Using a Java method to name a transaction is useful when:

  • You might not have a clear URI pattern, or
  • You are using an XML/JSON framework not otherwise supported

For example, consider the processOrder() doPost() http://acmeonline.com/store

public void doPost(HttpServletRequest req, HttpServletResponse resp) {
//process the data from the sevlet request and get the orderType and the items
processOrder(orderType,item)
...
}
public void processOrder(String orderType,String item) {
//process order
}

You want to derive transaction naming from the first parameter to the processOrder() orderType

  1. On the Rule Configuration tab for the custom match rule, enable the Split Transactions using the XML/JSON payload or Java method invocation.
  2. Select POJO Method Call as the splitting mechanism.
  3. For the method, choose the processOrder, and specify the parameter to use by numeric position in the parameter (0 index). The following screenshot displays the configuration of a custom match rule which will name all the qualifying requests into a Store.order.creditcard transaction:Rule Ediotr
In addition to the parameter, you can also specify either the return type or a recursive getter chain on the object to name the transaction. For example, if the method parameter points to a complex object like PurchaseOrder, you can use something like getOrderDetails().getType() to correctly name the transaction.