Apama 10.3 | Apama Documentation | Using Apama with Software AG Designer | Working with Projects | Adding resources to Apama projects | Creating new files for JMon applications | Adding an EPL Plug-in written in Java
Adding an EPL Plug-in written in Java
* To add a new EPL plug-in written in Java to an Apama project
1. In the Project Explorer view or the Workbench Project view, right-click the name of the project where you want to add the EPL plug-in and select New > Java EPL Plugin. You can also select File > New > Other from the menu and then select Apama > Java EPL Plugin from the Select a wizard dialog. The New Apama Java EPL Plugin wizard appears.
2. In the New Apama Java EPL plug-in wizard, enter information in the following fields:
a. The Application field is the application to which you are adding the plug-in.
b. In the Plugin name field, specify the name of the new plug-in. This will become the name of the class and the Java file.
c. The Description field is optional.
d. The Apama Package field is optional; this is the package of the plug-in inside the correlator.
e. The Source Folder field specifies the folder in the project to contain the file; by default this is java/src.
f. The Java Package field is optional; this is the package of the created Java class.
3. Click Finish. The name of the new class file now appears in the Project Explorer view or the Workbench Project view under the project that contains it and the .java file opens in the editor. In Project Explorer, the icon indicates a Java plug-in to the correlator.
4. You will find the source file for your Java class in the java/src package in your project. You can now add functionality to the class as required for your application. This can be called from EPL using the mechanism described in Using Java plug-ins.
For applications that you plan to inject into a correlator, the recommendation is to create separate jar files for:
*EPL plug-ins written in Java
*JMon applications
Although the mechanism for creating these jars and describing their meta-data is similar, the interactions of these two different uses of injected jars mean that they will often need to be injected into the correlator separately. The creation of separate jar files ensures that you can inject your application components in the correct order, which is typically:
1. EPL plug-ins written in Java
2. EPL monitors and events
3. JMon applications
For more information , see Overview of Apama JMon Applications and Writing EPL Plug-ins in Java.

Copyright © 2013-2018 | 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.