不知道这里有没有人使用ASTA的,它的稳定性如何?
本人的使用过程中发现.ASTA客户端程序经常会死掉(即:死循环在等待服务的消息).单客户使用时没有问题,只要多个客户端就会出现这种情况.如:一个客户端在使用事务方式复核单据,这果如果有其他的用户连进来就会造成之前的客户无法收到ASTA服务的消息.procedure TAstaSmartWait.StartWaiting;
var
  OrigCursor : TCursor;begin
if FWaiting then exit;
{$ifdef newTimeLimit}
   StartTimerTicking;
{$endif}
  OrigCursor := Screen.Cursor;
  case FWaitingCursor of
    cqHourGlass    : if Screen.Cursor<>crHourGlass then Screen.Cursor := crHourGlass;
    cqSQLHourGlass : if Screen.Cursor<>crSQLWait then Screen.Cursor := crSQLWait;
  end;
  If Assigned( OnStartOfWait ) then FOnStartOfWait( Self );
  FWaiting:=True;
 while (FWaiting) do begin
   if not ProcessMessage(Fhandle) then break;  //问题在这里 ProcessMessage方法收不到服务返回的消息 所有一直在死死循环
   {$ifdef Delphi6AndUp}
   // in D6 and Kylix it's necessary to process treads' syncronization calls
   // (TThread.Synchronize) manually
   if FCheckSync then  Classes.CheckSynchronize;
   {$endif}
   {$ifdef newTimeLimit}
   if TimerExceeded then break;
   {$endif}
  end;
  if Assigned(FOnEndOfWait) then FOnEndOfWait(Self);
  // Restore the original cursor
  FWaiting:=False;
  //02/26/2000 to only change the cursor back if it is set for something
  case FWaitingCursor of
    cqHourGlass    : if Screen.Cursor<>OrigCursor then Screen.Cursor := OrigCursor;
    cqSQLHourGlass : if Screen.Cursor<>OrigCursor then Screen.Cursor := OrigCursor;
  end;
end;