Apama 10.15.0 | Developing Apama Applications | Developing Apama Applications in Java | Developing and Deploying JMon Applications | Creating deployment descriptor files
 
Creating deployment descriptor files
 
Format for deployment descriptor files
Specifying the classpath in deployment descriptor files
Defining event types in deployment descriptor files
Defining monitor classes in deployment descriptor files
Inserting annotations for deployment descriptor files
Sample source files with annotations
Generating deployment descriptor files from annotations
The JMon application's JAR file must contain a deployment descriptor file. Inside the correlator, the JVM processes the application's deployment descriptor file and uses it as a guide to the event types and monitor classes to load. The name of the deployment descriptor file must be jmon-jar.xml.
When you use the Java support in Software AG Designer to develop your JMon application, the deployment descriptor file is generated for you. If you develop your JMon application outside Software AG Designer, there are two ways to create a deployment descriptor file:
*Manually write the deployment descriptor XML file. Use your favorite editor to create this XML file according to the Format for deployment descriptor files.
*Insert Java annotations in your source files and run a utility to generate the deployment descriptor file. The annotations you can insert are defined in the java.apama.jmon.annotation package.
Of course, you can use the utility to generate the deployment descriptor file and then manually edit the result. If you then run the utility again, you would lose any manual changes you had made.
The technique you use is largely a matter of personal preference — hand-coded or machine-generated. If you have a very large application with many event types and monitors, you might prefer to insert the annotations and generate the deployment descriptor file. If you have a small application, you might find it easier to write the deployment descriptor file.