Apama 10.3.1 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in Java | Developing and Deploying JMon Applications | Steps for developing JMon applications in Software AG Designer
 
Steps for developing JMon applications in Software AG Designer
* To develop JMon applications in Software AG Designer
1. Add Java support to a project.
See Adding the Java nature to an Apama project.
2. Create your application's source files.
Select File > New > Java Event or select File > New > Java Monitor.
Or, in the Project Explorer, right-click your project and select New > Java Event or select New > Java Monitor.
A wizard appears that lets you specify the event or monitor's name, the package, a description, the Java source folder and Java package. Software AG Designer automatically adds an entry for the event or monitor to the jmon-jar.xml deployment descriptor file and regenerates the JMon JAR file to include the new event or monitor.
If you want to build your JAR files manually, right-click your project and select Apama > Build JAR Files. This is useful if you unselected the Build jar files automatically option in the apama_java.xml file, which is in the config directory of your project. One reason you might not want to build the JAR files automatically is that the build takes too long. When Build jar files automatically is selected, Software AG Designer builds the JAR files every time you modify a JMon file.
If there are events that you defined in JMon and you refer to those events, or listen for those events in EPL code, then you must define those events in EPL as well as JMon. If you do not also define the events in EPL, Software AG Designer flags EPL references to those events as errors.
See also Creating new files for JMon applications.
3. Create your application's launch configuration.
Software AG Designer adds all JMon JAR files to the correlator initialization list and all non-JMon JAR files to the correlator class path.
If you want to build your project's files outside Software AG Designer and Eclipse, right-click your project and select Apama > Generate Ant Buildfiles. Software AG Designer generates an Ant build file (with the name build-project_name.xml), which you can use only to build your project's JMon JAR files outside of the Eclipse environment. Note that this is unrelated to the Software AG Designer feature for exporting an Ant build file that you can use for deployment.
See Defining custom launch configurations.
4. Run and test your application.
See Launching Projects.
5. Debug your application.
See Debugging JMon Applications.
6. Deploy your application.
See Deploying JMon applications.
Software AG Designer generates your application's JMon JAR file in the jmon_config_name java application files folder of your project's directory. By default, jmon_config_name is the project name.
You can manage the content of the JMon JAR file and jmon-jar.xml file by using the editor in Software AG Designer to update the apama_java.xml file, which is located in the project's config folder. You can use this editor to do the following:
*Set JMon metadata.
*Set the injection order of the events and monitors.
*Add non-JMon Java classes to the JMon JAR files.
*Add JMon classes that were not created by the Apama wizards in Software AG Designer to the JMon JAR file.

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.