JavaGetUserObject Function

Action

Returns the handle on the JavaUser object loaded by JavaUserInit command. This handle can be used to exploit the new Java Framework functionality with the existing JavaUserFramework script of prior Silk Performer versions.

Include file

Java.bdh

Syntax

JavaGetUserObject( ): number;

Return value

Handle on the JavaUser object.

Example

  transaction  TInit
  begin
    JavaCreateJavaVM();
    JavaUserInit("SilkPerformerUser");
  end TInit;

  transaction TMyJavaTrans
  var
    hObj : number;
  begin                               
    ThinkTime(0.2);
    JavaCallMethod(JavaGetUserObject(), "myComplexMethod");
    hObj := JavaGetObject(JavaGetUserObject());
  end TMyJavaTrans;