Apama 10.15.0 | Developing Apama Applications | Developing Apama Applications in Java | Developing and Deploying JMon Applications | Steps for developing JMon applications manually
 
Steps for developing JMon applications manually
*To develop JMon applications outside Software AG Designer
1. Ensure that ap-correlator-extension-api.jar is in your Java CLASSPATH environment variable.
2. Create a folder in which to develop your application.
3. In this development folder, define one .java file for each event type and one .java file for each monitor class.
4. Ensure that there is a deployment descriptor file named jmon-jar.xml. See Creating deployment descriptor files.
5. In your development folder, compile all your Java source code.
javac *.java
If ap-correlator-extension-api.jar is not already in your CLASSPATH environment variable, you can specify the –classpath command-line option to point to ap-correlator-extension-api.jar.
6. In your development folder, create a JAR file that contains the deployment descriptor and all class files. The command line format is as follows:
jar –cf application_name.jar META-INF/jmon-jar.xml *.class
Replace application_name with a name you choose for your application. On Windows, use backslashes (\) instead of forward slashes (/).
If your application uses an event type definition class that is also used by another JMon application, you must include the event type definition class in the JAR file of each application that uses it. If you do not include a shared event type definition class in your application's JAR file, injection fails with an ApplicationVerificationException.
You cannot specify the location of a shared event type definition class in your CLASSPATH environment variable. The correlator uses a separate classloader for each application, and it cannot use the system classloader for event type definition classes.
7. If any of your application's .class files are in your CLASSPATH environment variable, remove them. If the JRE can resolve a class path by using either your application's JAR file or your CLASSPATH environment variable, Apama fails to load your application.