Editing Launch Configurations

Introduction

This topic describes how to use the Run Configuration Wizard and Debug Configuration Wizard. Both wizards have the same usages and allow you to set the same settings.

Note

StreamBase Studio provides two entrance paths for setting up launch configurations: one for running applications, and another for debugging. By default, however, Studio configures and saves a single set of named configurations per Studio workspace, whether for running or debugging. The Open Run Dialog and Open Run Dialog menu options invoke almost identical configuration dialogs.

Create a New Launch Configuration

To create a new StreamBase launch configuration, open the Run or Debug dialog and do one of the following:

  • In the left pane, right-click StreamBase Application, and choose New in the context menu.

  • In the left pane, select StreamBase Application and click the New toolbar button.

  • Select the name of an existing StreamBase launch configuration and click the Duplicate toolbar button.

Edit an Existing Launch Configuration

To edit an existing launch configuration:

  • Open the the Run or Debug dialog .

  • Select the name of the configuration to edit.

  • Make changes in the tabs of the wizard and click the Apply button before you leave each tab.

  • Click Revert to undo changes since the last saved version.

After applying your edits, click Close to preserve your edits and exit the wizard.

In the Run dialog, you can click Run to run the newly edited launch configuration. Running a configuration places it at the top of the list of last-run configurations.

In the Debug dialog, you can click Debug to run and debug the current launch configuration.

The Main Tab

Name

A configuration name is generated for you. Change the name according to your site's standards. The name you enter is not reflected in the navigator on the left until you click Apply.

Application

Specify the path to the StreamBase EventFlow or StreamSQL application file to be run or debugged. Paths are absolute, measured from the root of the current Studio workspace. The easiest way to enter the correct path format is to browse for an application file using the Browse button. The resulting dialog shows a list of all .sbapp and .ssql files in your workspace. Select the one you want and click OK.

Target Server

Choose one of the following options:

Local

Launches the StreamBase Server on this machine.

Remote using workspace defaults

Launches a StreamBase Server on a separate UNIX machine using default server settings. If you previously defined a default server machine and username in your StreamBase Studio preferences, those defaults are automatically used. See StreamBase Studio Preferences for details.

Remote using the following target server

Launches a StreamBase Server on a separate UNIX machine with settings that you specify for this launcher only (any workspace defaults are ignored). Fill in the next two fields:

Server machine

Enter the name of the remote host on which to invoke StreamBase Server. The remote host name must be a valid DNS name, IP address, or the string localhost, and can be optionally followed by a colon and the port number on which the remote server will listen. The remote server must be accessible from this machine using SSH. For example:

wayfast.example.com:22
Username

Enter a valid SSH username on the specified remote host. The username must be already set up and tested for SSH connectivity to the specified host.

The Advanced Tab

Debugging Options

The Enable Intermediate Stream Dequeue checkbox allows you to dequeue from intermediate streams while your application is running, for temporary debugging purposes only. Enabling this checkbox is the same as setting -Dstreambase.codegen.intermediate-stream-dequeue=true in sbd's jvm-args in the server configuration file. You can optionally specify a regular expression that matches the names of the intermediate streams whose output you want to dequeue. This is equivalent to setting -Dstreambase.codegen.intermediate-stream-dequeue-regex=pattern. See Dequeuing Data from Intermediate Streams for more information.

The Allow Remote Java Debugging checkbox is for debugging embedded Java modules you have added to your StreamBase application. Specify the port number to which a remote Java debugger will connect to your Java module. For example, you might be using Eclipse's Remote Java Application Debug Launch Configuration to debug embedded Java code live, running inside a StreamBase Server instance that was launched with this option checked.

Server Logging Level

Select Current Studio logging level to use the logging level that Studio knows about at launch time. If you start Studio with a higher log level, launch configurations that use this setting will use the higher log level.

Select Specified to override the global logging level. The higher the log level number you specify, the more messages and message types are sent to the Console View and/or to an output log file, if this launch configuration specifies one.

Persistent Data Options

This option specifies a directory to be used for persistent data in disk-based Query Tables (available only in StreamBase Enterprise Edition). This is the same option specified as --datadir when running sbd from the command line. Use the default or specify an existing directory, accessible to and writable by StreamBase Server.

Working Directory

Use this option to change the working directory for a local launch. Any files output by your running application (for example, generated CSV files) are created relative to your working directory. By default, the working directory is the folder that contains the application file you are launching. Click Specified to enter a different working directory. This option is ignored for remote target servers.

The Containers Tab

Running Applications in Containers

Use the Containers tab to specify one or more containers to hold and run other StreamBase applications that you want to start at the same time as the primary application specified on the Main tab. StreamBase containers are described on Container Overview.

You can run StreamBase Server with more than one container from the command line, by specifying your container configuration in the server configuration file or interactively with sbadmin commands. The Containers tab allows you to do the same in StreamBase Studio.

With multiple applications running in containers, the names of streams in applications running in non-default containers are prefixed with the container name. Thus, sideplay.OutgoingBids refers to the output stream named OutgoingBids in the application running in the container named sideplay.

Most of the features of running an application in Studio apply to the applications running in containers as well. This includes:

  • In the Manual Input view, you can send tuples manually to input streams in non-default containers.

  • The Application Input view shows tuples sent to all input streams, including those in non-default containers.

  • The Application Output view shows tuples from all output streams in all running containers.

However, running multiple containers in Studio has the following limitations:

  • The primary StreamBase application, the one specified on the Main tab, is always started in a container named default. You cannot name the container for the primary application.

  • When debugging, only the path through the primary application is traversed. Debugging does not step across container boundaries.

  • You cannot create separate feed simulations for the primary application and for applications running in containers. Only streams in the default container can be addressed.

Making Container Connections

Use the Selected Container Connections area to specify one or more connections between containers. Container connections are described in Container Connections.

You will typically use this feature to specify a stream to stream connection, where an input stream in one application and container receives tuples from an output stream in another application and container. However, you can specify any container connection type in the Containers tab that you can specify in the server configuration file or interactively with the sbadmin command.

To specify a container connection, first select the line for the container of interest in the Containers section of the tab. Click the New button, and specify the Source and Destination streams, using stream names qualified with the container name, as shown in this example:

Select an existing container connection line to activate the Edit, Duplicate, and Remove buttons. To create a container connection that is very similar to an existing connection, use the Duplicate button to copy the existing connection, then select the new connection and use the Edit button to modify the new connection.

The Common Tab

The settings in the Common tab are common to all Eclipse launch configurations. Use Eclipse Help to learn how more about these options.

Save as

This option determines where this launch configuration is saved. The default setting, Local file, saves configurations in the workspace metadata area. As an alternative, you can select Shared file to save this launch configuration as a file in one of your Project folders. In this case, the launch configuration is saved as Name.launch, where Name is specified in the Name field. Specify the target Project folder using the Browse button.

Display in favorites menu

The favorites menu is a list of launch configuration names that appears in the second section of the drop-down menu of the Run and Debug buttons on the toolbar. The first section contains a changing list of recently-run launch configurations. Add a configuration to the favorites section to keep it in the menu, even when other applications have replaced it in the recently-run section. This option performs the same function as the Organize Favorites option in the Run and Debug drop-down menus.

Console Encoding

Use this section to specify a non-default character encoding for log messages sent to the Console View (and optionally to a standard output file).

Standard Input and Output

Allocate Console is checked by default. This specifies using the Console view to display logging messages written to standard output and standard error, and to accept text input, if your application requires it. You can disable this option for launch configurations that will run on remote StreamBase Servers.

File is unchecked by default. To specify that standard output and standard error of your application's run are written to a log file, check the File checkbox, and enter a path to an existing file. If both Allocate Console and File are checked, log messages are written to both places. You must designate the path to the file using an Eclipse-specific syntax. Rather than typing a path, use the Browse Workspace or Browse File System buttons to navigate to an existing file, and let Eclipse write the syntax for you. To navigate to a file in the workspace, you must first have created it with Studio's FileNewFile menu option. If you are familiar with the Eclipse syntax required in this field, you can use the Variables button to build up a path from components.

Append is greyed out unless File is checked. Check the Append checkbox to have log messages appended to the file specified in the File field. By default, the file is overwritten with each run of this launch configuration.

Launch in background

This option is checked by default, to specify that the StreamBase Server process is launched in the background.

Launch Configuration Perspective-Change Preferences

By default, running or debugging a StreamBase application with a launch configuration automatically switches StreamBase Studio to the SB Test/Debug perspective, after prompting you to confirm. You can specify on the prompt dialog to not ask again.

The option to switch perspectives is not stored in the launch configuration itself, but is a global setting for all StreamBase applications, as specified in StreamBase Studio Preferences.

Back to Top ^