JoltCall Function

Action

Calls a specified service.

Include file

Jolt.bdh

Syntax

JoltCall( in hRemoteService : number,
          in hTransaction   : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hRemoteService Handle to a JoltRemoteService object that was created with JoltRemoteServiceNew
hTransaction Handle to a JoltTransaction object that was created with JoltTransactionNew (optional). If this parameter is omitted, the specified service is excluded from any transaction.

Example

var
  hSession, hSessionAttr, hInquiry: number;
dcltrans
  transaction TInit
  begin
    JavaSetOption(JAVA_VERSION, JAVA_V11);
    JavaSetOption(JAVA_HOME, "c:/jdk1.1.7");
    JavaSetOption(JAVA_CLASSPATH, "c:/jdk1.1.7");
    JoltInit();    hSessionAttr := JoltSessionAttributesNew();
    JoltSetString(hSessionAttr, APPADDRESS, "//lab:8000");
    hSession := JoltSessionNew(hSessionAttr, "", "ATM", "", "");
    hInquiry := JoltRemoteServiceNew("INQUIRY", hSession);
  end TInit; 

  transaction TMain
  var
    sBalance: string;
  begin
    JoltSetInt(hInquiry, "ACCOUNT_ID", 10001);
    JoltCall(hInquiry);
    JoltGetString(hInquiry, "SBALANCE", "", sBalance);
    writeln(sBalance);
  end TMain; 

  transaction TShutdown
  begin
    JoltEndSession(hSession);
    JoltFreeObject(hInquiry);
    JoltFreeObject(hSession);
    JoltFreeObject(hSessionAttr);
  end TShutdown;

See also

Java: bea.jolt.JoltRemoteService class