Description:
Changes were made to a CA Gen java user exit called CFBDynamicMessageEncodingExit.java and it needs to be compiled to produce a new .class file that can be used at runtime. How can this user exit be compiled? What CA Gen files need to be referenced in order for a successful compilation?
Solution:
In order to compile a CA Gen java user exit such as the exit CFBDynamicMessageEncodingExit.java, the following steps need to be performed:
- Create a Runtime JAR file:
Example 1: Using the mkjavart command
Before executing the command to compile the user exit, we need to create a jar file containing the CA Gen java runtime classes. These class files will be referenced in the command used to compile the user exit. To do this, open a DOS prompt and change to the %IEF% \classes directory. Type the command as shown below (circled in red) and press Enter:
<Please see attached file for image>
myrt76.jar is the jar file name used in this example. You can give it any name you want with a .jar extension. 'All' is the option used in this example although there are other options available also (type mkjavart and press Enter to see the options).
Example 2: Using the genrt.76.jar file
Alternatively, if you have already assembled your CA Gen Web Application, then you should have a genrt.76.jar file in the <model.ief>\java\deploy.j2ee folder. This file can also be referenced in the command used to compile the user exit as it contains the needed class files. Below is an example of the Sample model's deploy.j2ee folder containing this file.
<Please see attached file for image>
In essence, you can use either the runtime jar file that was created using the mkjavart command or the one present in the deploy.j2ee folder.
- Compile the User Exit:
Example 1: Using the myrt76.jar file
Open a DOS prompt and change to the directory where the user exit is located, for e.g. %IEF%\classes\com\ca\gen76 \exits\msgobj\cfb. Once you have changed to the above location, type the command as shown below (enclosed in red):
<Please see attached file for image>
Upon a successful execution of the command, it should return to an empty prompt (as shown above). The cfb folder should now have an updated class file for the user exit.
Example 2: Using the genrt.76.jar file
Open a DOS prompt and change to the directory where the user exit is located, for e.g. %IEF%\classes\com\ca\gen76 \exits\msgobj\cfb. Once you have changed to the above location, type the command as shown below (enclosed in red):
<Please see attached file for image>
The above example references the genrt.76.jar file present in the Sample model's deploy.j2ee folder. Upon a successful execution of the command, it should return to an empty prompt (as shown above). The cfb folder should now have an updated class file for the user exit.