Start LiveView from Studio normally and then do a "remote attach" from Studio to the StreamBase application running in the LiveView server. StreamBase applications within a LiveView server run in their own container, named the same as the top-level EventFlow module configured to run.
Prerequisites: - All StreamBase applications which are to run in the LiveView server must be started as a data-source for a LV Table, or have an application .lvconf file which starts them within the server.
- All StreamBase streams which the Manual Input view is to interact with must be marked "Always expose Stream for Enqueue", otherwise they will not be exposed for remote connection. See documentation reference: TIBCO Streaming > Authoring Guide > Using Streams > Defining Input Streams, "Properties: General Tab"
Set up Studio to connect to LiveView: - Open from the Run menu, Run Configurations.
- Create a new "Attach to EventFlow Fragment" configuration item.
- Give it a name and click the Browse button.
- Select the .sbapp module used as the top-level application module that has the streams to connect to.
- If the StreamBase port is configured differently than the default (port 10000) then change the URL to include the port (for example: sb://localhost:10010 ). The port must be a specific port and not a randomly chosen port (port zero, "0", is a random port when defined in the ClientAPIListener (com.tibco.ep.streambase.configuration.sbclientapilistener) HOCON configuration and is incompatible with this setup).
- Click Apply to save and then Close the dialog.
Example:
Run and Attach: - Start the LiveView server and wait for it to report "INFO { Server Started }"
- In Studio, from the Run toolbar-button or Run menu, select the name of the Run Configuration defined above to connect from Studio's Test/Debug perspective to the LiveView server.
- In the Test/Debug perspective Manual Input view, select the SB container input stream.
- Submit a tuple to the stream.
Note that as of TIBCO Streaming 10.5, detaching will terminate the remote server process. We recommend stopping the LiveView Server from the Studio toolbar before stopping the StreamBase Attach run, since this allows LiveView to exit more cleanly than if Studio terminates the SB container within the LiveView server.