Identifying the top level applications in a StreamBase 10 project

Identifying the top level applications in a StreamBase 10 project

book

Article ID: KB0083403

calendar_today

Updated On:

Products Versions
TIBCO Streaming 10

Description

A StreamBase project may have many application files (*.sbapp modules) related to each other in a hierarchy. A project also may define several applications, each with their own topmost module. It can be difficult to tell at a glance which sbapp files are top-level applications.

How do you tell which sbapp files are the top-level modules? 

Issue/Introduction

How to identify the main application.

Resolution

There are two approaches to determining which sbapp is the topmost parent:
A). Examine the related EventFlowDeployment configurations,
B). Use Search to exclude modules referenced by other modules.

A). Examine the related EventFlowDeployment configurations,

To tell which sbapp is the topmost parent module in a well defined project, open all StreamBase Engine Configuration files found in folder src/main/configurations. These will have "type" "com.tibco.ep.streambase.configuration.sbengine" and have contents like (example):
name = "dep"
type = "com.tibco.ep.streambase.configuration.sbengine"
version = "1.0.0"

configuration = {
	EventFlowDeployment = {
		modules = [
		  {
		    moduleName = com.sb.support.scratch.scratch.sbapp
		    containerName = first
		  }	
		  {
		    moduleName = com.sb.support.scratch.anotherapp
		    containerName = second
		  }			  
		]
	}
}
This example has two top-level applications, scratch.sbapp and anotherapp.sbapp (the .sbapp extension is optional and assumed if not specified).

EventFlowDeployment configurations may also be found in the associated "application" project which references this "fragment" project. An "application" project will have an "com.tibco.ep.dtm.configuration.application" configuration in the src/main/configurations folder that defines an "ApplicationDefinition" configuration. A "fragment" project will have an "com.tibco.ep.dtm.configuration.application" configuration that defines a "FragmentDefinition".

B). Use Search to exclude modules referenced by other modules.

If there are no EventFlowDeployment configurations, then there should be only one top-level application and it will NOT be used in a Module reference from any other application.

To see if a given sbapp file is used as a child module:
1). Open menu: Search > Search...
2). In the "File Search" tab, type the name of the module (child.sbapp) without the .sbapp extension ("child") into the "Containing text:" field.
3). Set the "File name patterns" to "*.sbapp"
4). Set "Scope" to "Enclosing projects"
5). Click button "Search".
If the module name is found it will show up in the list as:
scratch.sbapp 
44: <param name="file" value="com.sb.support.scratch.child"/>  

In this case child.sbapp was referenced by scratch.sbapp on line 44 of the scratch.sbapp XML definition. Any sbapp file which is not referenced by another is a candidate for being a top-level application.