Contents
This sample demonstrates the use of the StreamBase InfoReach TMS Adapter, which connects to the InfoReach Trade Management System (TMS).
By default, the sample files are installed in:
- On Windows
-
C:\Program Files\StreamBase Systems\StreamBase.n.m\sample\adapter\embedded\inforeach-tms\ - On UNIX
-
/opt/streambase/sample/adapter/embedded/inforeach-tms/
When you load the sample into StreamBase Studio, Studio copies the
sample project's files to your Studio workspace. StreamBase Systems
recommends that you use the workspace copy of the sample, especially on UNIX, where
you may not have write access to /opt/streambase. In
the default installation, the path to this sample in your Studio workspace is:
UNIX: ~/streambase-studio-n.m-workspace/sample_adapter_embedded_inforeach-tms Windows XP: C:\Documents and Settings\username\My Documents\StreamBase Studion.mWorkspace\ sample_adapter_embedded_inforeach-tms Windows Vista: C:\Users\username\Documents\StreamBase Studion.mWorkspace\ sample_adapter_embedded_inforeach-tms
-
In the Package Explorer, double-click to open the
inforeach-tms.sbappapplication. -
In the EventFlow editor, click the TMS adapter's icon to display the adapter's Properties view. In the Adapter Settings tab, inspect the TMS Installation Directory value, which has a certain Windows path by default. Edit this path as appropriate for your system.
-
Click the
Run button. This opens the SB
Test/Debug perspective and starts the application.
-
In the Test/Debug Perspective, look in the Console view for several pages of messages as the TMS client-side system is started. After this, look for messages like the following:
[notice] StreamBase InfoReach TMS Adapter: TMS system started[notice] sbd athostname:10000; pid=4568; Listening -
As portfolio, target, and order messages are sent by TMS, tuples are emitted on the corresponding output stream. In the Application Output view, select one of the streams to observe the incoming tuples.
-
When done, press F9 or click the
Stop Running Application button.
This section describes how to run the sample in UNIX terminal windows or Windows command prompt windows. On Windows, be sure to use the StreamBase Command Prompt from the Start menu as described in the Test/Debug Guide, not the default command prompt.
-
Open two terminal windows on UNIX, or two StreamBase Command Prompts on Windows. In each window, navigate to the directory where the sample is installed, or to your workspace copy of the sample, as described above.
-
In window 1, type:
sbd inforeach-tms.sbappIf the adapter connects successfully to TMS, you see several pages of messages as the TMS client-side system is started. Look for the following messages:
[notice] StreamBase InfoReach TMS Adapter: TMS system started[notice] sbd athostname:10000; pid=4568; Listening -
In window 2, type:
sbc dequeue -vThis window displays the tuples dequeued from the adapter's output ports as portfolio, target, and order messages are sent by TMS.
-
In window 2, type: Ctrl-Z (Windows) or Ctrl-D (UNIX) to exit the sbc session.
-
In window 2, type the following command to terminate the server:
sbadmin shutdown
