sbbundle

StreamBase Application Bundle Generator — Creates StreamBase application bundles.

SYNOPSIS

sbbundle {[-a appname.[sbapp|ssql] | -f config.sbconf ]} [[-o]] {filename.sbbundle}

sbbundle {[-r | -x] config.sbconf ]} {filename.sbbundle}

DESCRIPTION

Use sbbundle to create or modify a StreamBase application bundle file, which must have an .sbbundle extension. A bundle file is an archive file that contains a deployable application environment. That is, it contains the collection of files needed to deploy and run a StreamBase application on a supported StreamBase Server. A typical use for bundle files is to package a StreamBase application so that it is ready for deployment.

To run a bundled application, pass a bundle file as an argument to the sbd command that starts StreamBase Server. For example:

sbd myapplication.sbbundle

The bundling process determines the necessary module files by reading the provided top-level EventFlow or StreamSQL application, or by reading a StreamBase Server configuration file, or both. A top-level application file is parsed to determine the modules called. The configuration file is parsed by the bundler to determine the application's current requirements. All definitions in the configuration file are preserved, and any referenced JAR files or other native resource files are included in the bundle.

Thus, to create a new bundle, you must specify either:

  • A top-level application file with the –a option, plus an optional configuration file with the –f option.

  • Only a configuration file with the –f option. In this case, the configuration file must specify the name of the top-level application module in an application element.

Just as with unbundled StreamBase applications, you can create and run an application bundle on any supported machine configuration. The version of StreamBase and of any called resource must be the same on the machine that runs the bundle as on the machine that generates the bundle. The StreamBase version is specific down to the minor release number, which is the second position in the release number. Thus, an sbbundle file created with the sbbundle command from StreamBase release 6.2 can only be run with the sbd server from release 6.2.

If an application being bundled has a configuration file that references Java resources in jar and dir elements, those resources are included in the bundle, and the bundle's configuration file is rewritten to specify the bundled path of those resources.

If the application being bundled references a JDBC or Chronicle data source, then the same path to that data source must be accessible on the machine that runs the bundle. As an alternative, you can specify the path to a test data source during development, and bundle the application with a configuration file that references the test data source. You can later extract the configuration file from the bundle using the –x option, edit the JDBC URI to point to a production data source, then replace the edited configuration file back into the bundle using the –r option.

The bundling process supports multiple containers and container connections if they are specified in application elements in the configuration file. The top-level application specified with the –a option is always bundled to run in the default container.

The following resource types are NOT included in the bundle:

  • Global operators and adapters.

  • Native code, such as C++ plug-ins or native DLL or .so libraries.

For more information, see What Files Do Not Get Bundled on the Application Bundling page in the Administration Guide.

Application archive files with .sbar extension are accepted into a bundle, but sbbundle issues a warning when encountering these files. A bundle that includes an .sbar file may or may not run, depending on the resource requirements of the archived application in the .sbar file. For details, see Bundling and Precompiled Archive Files on the Application Bundling page in the Administration Guide.

OPTIONS

-h, --help

Displays usage text.

-a appname.sbapp | appname.ssql

Specifies the name of a top-level EventFlow or StreamSQL application file to be the primary application in the specified application bundle. The specified application is bundled to run in the default container. To create an application bundle, you must specify either –a or –f or both.

-f sbd.sbconf

Specifies the name of a StreamBase Server configuration file to control the runtime behavior of the primary application in the bundle. If you specify both –a and –f, the configuration file controls the application named with the –a option. If you specify only –f, the configuration file must contain an application element that gives the path to a top-level EventFlow or StreamSQL application file. To create an application bundle, you must specify either –a or –f or both.

-o

Overwrite any existing StreamBase bundle file of the same name.

-r file.sbconf

Specifies the name of a server configuration file to replace the bundle's configuration file. Use this feature in conjunction with the –x option to extract the configuration file from a bundle, edit it to specify deployment-specific information, then replace the edited configuration file. Only replace the configuration file with one that was extracted with –x from the same bundle.

--version

Displays version information and exits.

-x file.sbconf

Extracts the configuration file from an existing bundle, and writes it to the path and name you specify as the argument to –x. Use this feature as described above for the –r option. Do not edit any path attributes in the extracted configuration file.