Setting up Event Handlers

Once the event handler class file is compiled, add it to the Transaction Server scheduler XML file. This is done by adding the fully qualified class name to an EVENT specification in the scheduler XML as in the following example:
<EVENT>
   <NAME>My Entry Event Processing</NAME>
   <TYPE>EntryUowStateChange</TYPE>
   <EXEC>com.mycorp.userexits.SampleEntryEvent</EXEC>
</EVENT>
To ensure the user exits can be loaded in the Transaction Server, the path to the new user class file must be added to the Java™ class path within the Transaction Server environment. It may be done the following ways:
  1. Use an operating system tool to modify the default CLASSPATH environment variable for all applications and add c:\MyUserExits to this setting.
  2. Add a userenv script file to the Transaction Server cmd subdirectory and edit it to modify the class path. For example:
    set CLASSPATH=c:\MyUserExits;%CLASSPATH%

The advantage of using a userenv script file is that it makes the user exit available to only the Transaction Server and does not clutter the class path with paths that are not used by other Java applications. The Transaction Server detects the presence of the userenv script file while starting up and executes it to allow modification of any environment variable required. They are available to the Transaction Server execution environment only.

Once the user exits are successfully compiled and referenced in the Java class path, they become part of the Transaction Server operation and are available for performing various user required tasks.