Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 2 Project Design Tutorial : Add a Cluster Deployment Descriptor and Build the EAR File

Add a Cluster Deployment Descriptor and Build the EAR File
To deploy a project you need a CDD file and an EAR file. The CDD is not included in the project EAR. This means you can reconfigure a project’s deployment configuration without having to rebuild the EAR.
Learning Points
What is an EAR  The Enterprise Archive or EAR file contains details for all the resources in a project, and project global variables.
What is a CDD  The project’s deployment configuration is defined in an XML file called the Cluster Deployment Descriptor, or CDD. You edit this file using the TIBCO BusinessEvents Studio Cluster Deployment Descriptor editor.
How do I set up preprocessors and startup and shutdown rule functions?  The CDD is where you configure rule functions to act as event preprocessors, startup rule functions, or shutdown rule functions. Only rule functions whose Validity setting is Action are valid for these uses. (These rule functions cannot require anything to be in their scope, because they execute outside of the context of the Rete network and TIBCO BusinessEvents project resources.) A preprocessor is associated with a destination. It processes events arriving at that destination.
What is an object management type?  Object management (OM) refers to how TIBCO BusinessEvents manages and uses the objects generated within the TIBCO BusinessEvents application at runtime. This tutorial focuses on the basics, so it uses In Memory, the simplest OM type. Objects are kept in memory only, and are lost when the engine stops. Cache OM is explained in Chapter 3, Cache OM Tutorial.
What is an inference agent?  An agent does certain work within the engine. With Cache OM, different types of agents do different work. But for this simple In Memory OM project, you use only one agent of one type, and that is the inference agent. Inference agents listen for messages arriving at destinations, and transform them into events. The events trigger rules, using the agent’s Rete network and forward chaining, and the inference agent executes the rules.
What is a processing unit?  A processing unit is deployed as a TIBCO BusinessEvents engine. It has one or more agents (depending on OM and requirements) and it runs in one JVM. For In Memory OM, you generally do not have to do much configuration of processing units. The default processing unit settings are usually sufficient.
More Information
In TIBCO BusinessEvents Developer’s Guide, see these chapters:
Task R Add and Configure a CDD
1.
In TIBCO BusinessEvents Studio Explorer, right click the project name, FraudDetection, and select New > Cluster Deployment Descriptor. You see the New Cluster Configuration Wizard.
You can create multiple CDD files for a project and at deploy time use the one that has the configuration you want to use.
2.
Unlike other project resources, you can change the name later as desired. Short names are easier to type when starting the engine at the command line.
3.
At the Template Selection page, select In Memory from the Object Management Type drop-down list. Then click Finish.
You see the CDD editor, displaying the template for In Memory OM. For an In Memory project, very little deployment configuration is required.
4.
Click the Collections tab, and do the following:
a.
Select Input Destinations and click Add.
b.
c.
In the Select Input Destinations dialog, select /Channels/HTTP/AllOps and click OK. A Configuration panel appears.
d.
In the Input Destination ID field, type AllOperations, replacing the generated ID.
e.
In the Preprocessor field, select /RuleFunctions/PreProcessor.
The Configuration panel looks like this:
Collections enable you to create resources you can reuse when configuring multiple agent classes. Collections are used here to demonstrate the feature. In simple projects, you could simply configure the agent class without using collections.
5.
When configuring an agent class, you can select a subset of the project rules, select and configure destinations, and select startup and shutdown rule functions. Thus different agent classes can behave quite differently at runtime.
6.
Select Input Destination Collections and click Add. You see the Select Input Destinations dialog. In the Reference Collections area, select Http and click OK.
As mentioned above, you can configure input destinations here, or link to input destinations configured in the Collections tab—or use both methods. Here we reference the collection you already defined.
7.
Select Startup Functions and click Add. In the Select Rule Functions dialog, select /RuleFunctions/InitializeScorecard and click OK. When the engine starts, this rule function executes and initializes the scorecard values.
8.
Task S Build the EAR File
When you build the EAR file you must save it outside the project tree, or it will be recursively included in the next EAR file you build!
1.
If you see a message asking you to save all project resources, click Yes. It means an unsaved resource editor is open.
At the Build Enterprise Archive dialog, you can change the name to fd. (Short names are easier to type when starting the engine at the command line.)
2.
Where you build the EAR is not so important. You just have to specify the correct location when starting the engine at the command line.
3.
Click Apply, then click OK. You see messages as the EAR file builds, then you see a message that the EAR file has built correctly:
Summary and Next Step
Congratulations! You are ready to deploy the FraudDetection project.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved