JavaUserInit Function

Action

Calls the JavaUserInit method of the Java class that implements the behavior of the virtual user. This function must be called in the initialization transaction of your test script.

Include file

Java.bdh

Syntax

JavaUserInit( in sClassName: string ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
sClassName The name of the Java class that implements the behavior of the virtual user.

Example

dcltrans
  transaction TInit
  begin
    JavaSetOption(JAVA_VERSION, JAVA_V11);
    JavaSetOption(JAVA_HOME, "c:/jdk1.1.7");
    JavaSetOption(JAVA_CLASSPATH, "c:/myApplication/classes;c:/myTools/tools.zip");
    JavaCreateJavaVM();
    JavaUserInit("SilkPerformerUser");
  end TInit;

  transaction TRun
  begin
    JavaUserRun();
  end TRun;

  transaction TMyTransaction
  begin
    JavaUserMethod("MyMethod");
  end TMyTransaction;

  transaction TShutdown
  begin
    JavaUserShutdown();
  end TShutdown;