Headless deployment of a monitor model

You can generate the Java™ 6 Platform, Enterprise Edition (Java EE) application code for a given monitor model without starting the Business Monitor development toolkit. This is called headless deployment, meaning that it does not require a user interface. Headless deployment is useful for automated development and testing, although it can also be used in a production environment. The monitor model file and all of the supporting source files produced by the Monitor Model editor can be exported as a project interchange file and used as input for the headless deployment.

Before you begin

Before running headless deployment, validate the model either by using headless validation or by fixing all errors in the Monitor Model editor.

About this task

The mmdeploy script is basically a generator. It takes a .zip file containing Eclipse projects and generates an EAR file for a monitor model. Like the WebSphere® Application Server ejbdeploy and the Integration Designer servicedeploy scripts, the mmdeploy script does not deploy an EAR file to the server; it just produces the EAR file.

Headless deployment uses the mmdeploy script at the command line. The command has the following format:
mmdeploy -pi project_interchange_file -w working directory
-ear path/filename_of_ear_file -mm /monitor_model_project/mmfile.mm [ options ]
Where:
project_interchange_file
is a project interchange (PI) file that was generated from the Monitor Model editor using File > Export > Other > Project Interchange. The PI file must contain a project with a single monitor model and its associated event definitions. The event definitions can reside in the same project as the monitor model or in an associated project. If the events are in an associated project, both projects must be included in the PI file that is used as input to the mmdeploy command.
Restriction: Because only one monitor model can be processed by this command, the business monitoring project in the PI file must contain only one monitor model.
working directory
indicates the temporary working directory that contains the model file.
Important: The workspace must not be in use by another process.
path/filename_of_ear_file
is the name to use for the resulting enterprise archive (EAR) file, which is the file that can be deployed to the IBM® Business Monitor V8.5.5 server. If the EAR file already exists at the specified location, it is overwritten.
If -ear is not specified, the EAR file that is created ( <ModelID>Application.ear) is written to the directory where the project interchange .zip file is located.
monitor_model_projectmmfile.mm
is the name of the monitor model project that the monitor model resides in and the name of monitor model to use in the project interchange file. You must use forward slashes (/) with your path name.
The following example shows how to run mmdeploy from your installation directory (for example, C:\IID_installation_directory\runtimes\bi_v85\bin):
mmdeploy -pi C:\Models\StockTradeBPELV5PI.zip -w C:\workingDir -ear C:\Models\StocktradeBPELV5.ear -mm /StockTradeBPELMM/StockTradeBPELBRHTM.mm
Available options are as follows:
-novalidation
Turn off monitor model validation.
-ignorevalidation
Do not stop for validation errors.
-keep
Do not clean up on exit.
-w workingdir
Specify a temporary working directory.
Tip: When -w is used, the directory specified must already exist.

You can find the mmdeploy.bat file in the bin directory of your WebSphere Application Server or in your toolkit.

Essentially, the mmdeploy script has the following command format:
java -cp "%PathToRADInstallDirectory%startup.jar" org.eclipse.core.launcher.Main
-application com.ibm.wbimonitor.deploy.mmdeploy.MonitoringModelDeploy
-data "%WorkspaceDirectory%"
-pi %ProjectInterchangeFileName%
                               %*