Resource Search Path

Overview

The resource search path is the path along which StreamBase searches for file resources used by operators and adapters in the current application, or in a module called by the current application. File resources might include text files, SQL files, CSV data files from which to load tables or feed simulations, or other file types.

The resource search path is maintained independently of the module search path. This lets you set a wide search path for resources but a narrow one for modules, or the converse.

The resource search path precedence order is the same as for modules, described in Module Search Path Order of Precedence.

In the Package Explorer view, folders on the resource search path are decorated with an overlay icon.

Adding to the Resource Search Path

Add folders to the current project's resource search path in the following ways:

  • Designate a subfolder of the current project folder as a member of the resource search path using the Resource Search Path panel of the project properties dialog.

  • Add a project reference to another project in the Studio workspace, using the Project References panel of the project properties dialog.

To open the Resource Search Path panel, first open the Project Properties dialog for the project of interest, as described in StreamBase Project Properties. Then select Resource Search Path from the contents column on the left.

The operator sample group provides an illustration of putting resource files in a separate subfolder. See Operator Sample Group.

Resource Search Path Configuration File Snippets

Just below the Resolved Operator Resource Search Path grid, look for the Generate configuration file snippet controls.

Both links take the search path settings shown in the grid and write them out in the form of a valid fragment of a server configuration file. The purpose of these links is to create fragment configuration files that can be included in your project's top-level server configuration file using the <sb-include> or <xi:include> directives. This accelerates the creation of a server configuration file that can be used to run your project at the command prompt with the same settings used when running in Studio. The inclusion features of server configuration files are described in Using Modular Configuration Files.

The difference between the two links is as follows:

to workspace

This link opens a dialog showing your Studio workspace projects, and prompts you to select a project. Specify a name for your fragment file; the dialog provides the default name: operatorresourcesearchpath.include.sbconf. This link then writes the fragment configuration file using paths relative to the selected project. This is the most portable option.

to file system

This link opens a dialog that prompts you to select any local or network file system location, and prompts for a name for the fragment file, suggesting operatorresourcesearchpath.include.sbconf. This link then writes the fragment configuration file using full, absolute paths.

The following shows an example of a fragment configuration file, generated using the to workspace link above:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<streambase-configuration>
  <global>
    <operator-resource-search directory="." />
    <operator-resource-search directory="..\TC_common" />
    <operator-resource-search directory="..\TC_fx_handlers" />
    <operator-resource-search directory="..\TC_fx_handlers\venues\bbg-tradebook" />
    <operator-resource-search directory="..\TC_fx_handlers\venues\citifxesp" />
    <operator-resource-search directory="..\TC_fx_handlers\common" />
    <operator-resource-search directory="..\TC_fx_handlers\venues\barclays-barx" />
  </global>
</streambase-configuration>