Using native libraries in StreamBase 10 application deployment

Using native libraries in StreamBase 10 application deployment

book

Article ID: KB0080615

calendar_today

Updated On:

Products Versions
TIBCO Streaming 10

Description

How do I add a native library path so that the application and unit tests can access the required libraries?

Issue/Introduction

Configuration example

Resolution

Unit tests require access to HOCON configuration which requires StreamBase 10.3. Earlier releases lack this support.

The native libraries need to be physically located on the machine on which the StreamBase server is running. In the StreamBaseEngine HOCON configuration file add the externalClassPath and externalNativeLibraryPath configuration items.

Example myengine.conf:
name = "myengine"
version = "1.0.0"
type = "com.tibco.ep.streambase.configuration.sbengine"
configuration = {
  StreamBaseEngine = {
    externalClassPath = [
      "/absolute/path/d.jar"
      "/absolute/path/g.jar"
      "/absolute/path/root" 
    ]
    externalNativeLibraryPath = {
      "osx_x86_64" = [
        "/absolute/path/libfiles1"
        "/absolute/path/libfiles2"
      ]
      "windows_x86_64" = [
        "C:/absoute/path/library1"
        "C:/absoute/path/library2"
      ]
      "linux_x86_64" = [
        "/absolute/path/libfiles1"
        "/absolute/path/libfiles2"
      ]
    }
    # other items ...
  }
}
These path values may be replaced with substitution variables to allow for changes between separate deployment systems.

Alternatively and in addition, you may package the needed native libraries in a "nar" file which may then be included in the StreamBase Application Archive as a dependency. This requires an additional maven plugin. The path within the deployed node must then be discovered and introduced into to sbengine configuration as shown above and the project rebuilt. This is an advanced option for Maven experts which will not be described here in detail. See http://maven-nar.github.io/

 

Additional Information

http://maven-nar.github.io/ - GIT repository for optional Maven NAR plug-in