Contents
This sample demonstrates the use of the TIBCO StreamBase® Input Adapter for Wombat MAMA. See Wombat MAMA Input Adapter for details on the structure and use of this adapter.
-
To get this sample to typecheck you must specify the location of the MAMA SDK JAR file, which is typically named
mamajni.jar
. Follow these steps:-
In the Package Explorer, right click this sample's top-level project folder and select Properties from the context menu.
-
Select Java Build Path in the contents column.
-
Select the Libraries tab.
-
Click
. -
Navigate to the location of and select the
mamajni.jar
file on your local file system. -
Click
. -
Refresh the project's typecheck environment by pressing Ctrl+F5 or by selecting the project folder in the Package Explorer, right clicking, and selecting → from the context menu.
The MAMA API loads the transport configuration from a file named
mama.properties
, which should reside in a directory set in the WOMBAT_PATH environment variable. An examplemama.properties
file is available insample_config/mama.properties
. The subscribing adapter'sMiddleware
andTransport
properties must match the properties set inmama.properties
.It is strongly recommended that prior to running the StreamBase application, the user has a running mamalistenc client. The configuration and environment properties set in the adapter must match the parameters for the mamalistenc client.
The sample application is named
MamaSub.sbapp
. It demonstrates receiving data from a Wombat Feed Handler and emitting the resulting tuples on an output stream. -
-
Double-click to open the sample application,
MamaSub.sbapp
. -
Double-click on MamaOutput adapter. In the Properties view, select the Adapter Properties tab. Set the middleware and transport options to match the values defined in your
mama.properties
file on WOMBAT_PATH. -
In adapter properties the source should be set to the MAMA Source on which you will receive data.
-
Click the Run button. This opens the Test/Debug perspective and starts the application.
-
In the Test/Debug Perspective, open the Manual Input view. Enter any symbol you wish to subscribe to.
-
Open the Application Output view and observe tuples coming out of MarketDataOut stream.
-
When done, press F9 or click the Stop Running Application button.
In StreamBase Studio, import this sample with the following steps:
-
From the top menu, click
→ . -
Select this sample from the Embedded Input Adapters list.
-
Click OK.
StreamBase Studio creates a project for this sample.
When you load the sample into StreamBase Studio, Studio copies the sample project's files to your Studio workspace, which is normally part of your home directory, with full access rights.
Important
Load this sample in StreamBase Studio, and thereafter use the Studio workspace copy of the sample to run and test it, even when running from the command prompt.
Using the workspace copy of the sample avoids the permission problems that can occur when trying to work with the initially installed location of the sample. The default workspace location for this sample is:
studio-workspace
/sample_adapter_embedded_wombat-mama-sub
See Default Installation
Directories for the location of studio-workspace
on your system.
In the default TIBCO StreamBase installation, this sample's files are initially installed in:
streambase-install-dir
/sample/adapter/embedded/wombat-mama-sub
See Default Installation
Directories for the location of streambase-install-dir
on your system. This location
may require administrator privileges for write access, depending on your platform.