Code sample

See the %REPRA_HOME%\sample\client\MyMsgGenerator.java file on Windows or $REPRA_HOME/sample/client/MyMsgGenerator.java file on UNIX for an example for the customized AE message generator class.

StepsCompiling the customized message generator

  1. Change to the location of your message generator:

    • On Windows:

      cd C:\work\custom
      
    • On UNIX:

      cd /work/custom
      
  2. Use the Java compiler to define the -classpath parameter with the required libraries to compile the customized class. For example:

    • On Windows:

      md customclasses <enter>
      
      c:\jdk141\bin\javac -classpath .; C:\sybase\ EAServer\repra\lib\repraconn.jar
      
      -d customclasses com\mycompany\MyMsgGenerator.java
      
    • On UNIX:

      mkdir customclasses<enter>
      
      /usr/jdk141/bin/javac -classpath
      .:/opt/sybase/EAServer/repra/lib/repraconn.jar
      <enter>
      -d customclasses
      com/mycompany/MyMsgGenerator.java
      

StepsVerifying the compilation

  1. If the compilation command finishes without any error messages, go to the customclasses directory.

  2. Verify that MyMsgGenerator.class exists in com\mycompany on Windows or com/mycompany on UNIX.

  3. If MyMsgGenerator.class is not in com\mycompany, or if the compilation finished with errors, review the design.