Skip to content

How to set your application name

Application naming in FusionReactor is automatically detected by searching the following values in descending order:

  1. FRAPI.setTransactionApplicationName
  2. Request attribute ( fr.application.name )
  3. Middleware server
  4. Servlet init parameter (fr.application.name)
  5. Filter init parameter (fr.application.name)
  6. Web app context parameter
  7. Web app context name
  8. Web app servlet context path
  9. The default application Name

Setting the application name

FRAPI.setTransactionApplicationName

To set the application name with the FusionReactor API (FRAPI) you simply need to call the appropriate method within your code. This method of setting the application name takes precedence over all other methods, however it will only affect the single request where this method is called.

FRAPI.getInstance().setTransactionApplicationName("Application Name");

Request attribute ( fr.application.name )

To set the application name with a request attribute simply add the attribute to the request object. FusionReactor will then use this attribute as the application name when the request is complete. This approach will only affect the requests where this attribute is set.

request.setAttribute("fr.application.name", "Application Name");

Middleware server

With some application servers it is possible to set the name of the application in the code. For example, in Coldfusion you can set the name of the application using the tag.

<cfapplication name=CF App>

Servlet init parameter (fr.application.name)

Similar to the filter parameter settings you can set the application name for FusionReactor to use as a servlet init parameter. This can be done via the web.xml adding the parameter to the filter definition.

<servlet>
    <servlet-name>Servlet2</servlet-name>
    <servlet-class>com.intergral.fusionreactor.servlets.Servlet2</servlet-class>
    <init-param>
        <param-name>fr.application.name</param-name>
        <param-value>Application Name</param-value>
    </init-param>
</servlet>

Filter init parameter (fr.application.name)

To set the application name used by FusionReactor as a filter init parameter, edit the filter configuration and add the property fr.application.name with the value being the name of the application. This can be done via the web.xml adding the parameter to the filter definition.

<filter>
    <filter-name>Filter3</filter-name>
    <filter-class>com.intergral.test.fusionreactor.filters.Filter3</filter-class>
    <init-param>
        <param-name>fr.application.name</param-name>
        <param-value>Application Name</param-value>
    </init-param>
</filter>

Web app context parameter

To set the application name used by FusionReactor as a context parameter, edit the web.xml file and add the following code block.

<context-param>
    <param-name>fr.application.name</param-name>
    <param-value>JSP Test App</param-value>
</context-param>

Web app context name

The most common name will become the application context name. This name is defined in the web.xml for the application, using the display-name element.

<display-name>JSP Test Application</display-name>

Web app servlet context path

The last resort for the application name before it becomes the default is to use the context path for the application. This is the root of the URL for the application.

If, for example, your application is accessible via myDomain.com/myApp, the application name will be set to myApp.

The default application name

It is possible in the FusionReactor Menu Settings to disable automatic transaction naming and use the default value for every transaction.

This will result in the application name for every transaction being set to this value.

Need more help?

Contact support in the chat bubble and let us know how we can assist.